Skip to content

Commit 0be9e10

Browse files
committed
resolved merge conflicts for io html
2 parents 38da8ca + 1186ee0 commit 0be9e10

File tree

106 files changed

+2786
-1348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2786
-1348
lines changed

.github/actions/build_pandas/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ runs:
1414
micromamba list
1515
shell: bash -el {0}
1616

17+
- name: Uninstall existing Pandas installation
18+
run: |
19+
if pip list | grep -q ^pandas; then
20+
pip uninstall -y pandas || true
21+
fi
22+
shell: bash -el {0}
23+
1724
- name: Build Pandas
1825
run: |
1926
if [[ ${{ inputs.editable }} == "true" ]]; then

.github/workflows/unit-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
ENV_FILE: ci/deps/${{ matrix.env_file }}
8282
PATTERN: ${{ matrix.pattern }}
8383
EXTRA_APT: ${{ matrix.extra_apt || '' }}
84-
LANG: ${{ matrix.lang || '' }}
84+
LANG: ${{ matrix.lang || 'C.UTF-8' }}
8585
LC_ALL: ${{ matrix.lc_all || '' }}
8686
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
8787
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
@@ -122,7 +122,7 @@ jobs:
122122
- 5432:5432
123123

124124
moto:
125-
image: motoserver/moto:4.1.4
125+
image: motoserver/moto:4.1.12
126126
env:
127127
AWS_ACCESS_KEY_ID: foobar_key
128128
AWS_SECRET_ACCESS_KEY: foobar_secret
@@ -227,7 +227,7 @@ jobs:
227227
fi
228228
- name: Build environment and Run Tests
229229
run: |
230-
/opt/python/cp39-cp39/bin/python -m venv ~/virtualenvs/pandas-dev
230+
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
231231
. ~/virtualenvs/pandas-dev/bin/activate
232232
python -m pip install -U pip wheel setuptools meson[ninja]==1.0.1 meson-python==0.13.1
233233
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.46.1
@@ -265,7 +265,7 @@ jobs:
265265
apk add musl-locales
266266
- name: Build environment
267267
run: |
268-
/opt/python/cp39-cp39/bin/python -m venv ~/virtualenvs/pandas-dev
268+
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
269269
. ~/virtualenvs/pandas-dev/bin/activate
270270
python -m pip install -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.0.1
271271
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.46.1

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,11 @@ repos:
339339
language: python
340340
entry: python scripts/validate_unwanted_patterns.py --validation-type="strings_with_wrong_placed_whitespace"
341341
types_or: [python, cython]
342+
- id: unwanted-patterns-nodefault-used-not-only-for-typing
343+
name: Check that `pandas._libs.lib.NoDefault` is used only for typing
344+
language: python
345+
entry: python scripts/validate_unwanted_patterns.py --validation-type="nodefault_used_not_only_for_typing"
346+
types: [python]
342347
- id: use-pd_array-in-core
343348
name: Import pandas.array as pd_array in core
344349
language: python

ci/code_checks.sh

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,6 @@ BASE_DIR="$(dirname $0)/.."
2121
RET=0
2222
CHECK=$1
2323

24-
function invgrep {
25-
# grep with inverse exist status and formatting for azure-pipelines
26-
#
27-
# This function works exactly as grep, but with opposite exit status:
28-
# - 0 (success) when no patterns are found
29-
# - 1 (fail) when the patterns are found
30-
#
31-
# This is useful for the CI, as we want to fail if one of the patterns
32-
# that we want to avoid is found by grep.
33-
grep -n "$@" | sed "s/^/$INVGREP_PREPEND/" | sed "s/$/$INVGREP_APPEND/" ; EXIT_STATUS=${PIPESTATUS[0]}
34-
return $((! $EXIT_STATUS))
35-
}
36-
37-
if [[ "$GITHUB_ACTIONS" == "true" ]]; then
38-
INVGREP_PREPEND="##[error]"
39-
fi
40-
4124
### CODE ###
4225
if [[ -z "$CHECK" || "$CHECK" == "code" ]]; then
4326

@@ -105,12 +88,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
10588
pandas.errors.UnsupportedFunctionCall \
10689
pandas.test \
10790
pandas.NaT \
108-
pandas.read_clipboard \
109-
pandas.ExcelFile \
110-
pandas.ExcelFile.parse \
11191
pandas.io.formats.style.Styler.to_html \
112-
pandas.HDFStore.groups \
113-
pandas.HDFStore.walk \
11492
pandas.read_feather \
11593
pandas.DataFrame.to_feather \
11694
pandas.read_parquet \
@@ -123,30 +101,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
123101
pandas.io.stata.StataReader.value_labels \
124102
pandas.io.stata.StataReader.variable_labels \
125103
pandas.io.stata.StataWriter.write_file \
126-
pandas.core.resample.Resampler.__iter__ \
127-
pandas.core.resample.Resampler.groups \
128-
pandas.core.resample.Resampler.indices \
129-
pandas.core.resample.Resampler.get_group \
130-
pandas.core.resample.Resampler.ffill \
131-
pandas.core.resample.Resampler.asfreq \
132-
pandas.core.resample.Resampler.count \
133-
pandas.core.resample.Resampler.nunique \
134-
pandas.core.resample.Resampler.max \
135-
pandas.core.resample.Resampler.mean \
136-
pandas.core.resample.Resampler.median \
137-
pandas.core.resample.Resampler.min \
138-
pandas.core.resample.Resampler.ohlc \
139-
pandas.core.resample.Resampler.prod \
140-
pandas.core.resample.Resampler.size \
141-
pandas.core.resample.Resampler.sem \
142-
pandas.core.resample.Resampler.std \
143-
pandas.core.resample.Resampler.sum \
144-
pandas.core.resample.Resampler.var \
145-
pandas.core.resample.Resampler.quantile \
146-
pandas.describe_option \
147-
pandas.reset_option \
148-
pandas.get_option \
149-
pandas.set_option \
150104
pandas.plotting.deregister_matplotlib_converters \
151105
pandas.plotting.plot_params \
152106
pandas.plotting.register_matplotlib_converters \
@@ -155,32 +109,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
155109
pandas.util.hash_pandas_object \
156110
pandas_object \
157111
pandas.api.interchange.from_dataframe \
158-
pandas.Index.asof_locs \
159-
pandas.Index.get_slice_bound \
160-
pandas.RangeIndex \
161-
pandas.RangeIndex.start \
162-
pandas.RangeIndex.stop \
163-
pandas.RangeIndex.step \
164-
pandas.RangeIndex.from_range \
165-
pandas.CategoricalIndex.codes \
166-
pandas.CategoricalIndex.categories \
167-
pandas.CategoricalIndex.ordered \
168-
pandas.CategoricalIndex.reorder_categories \
169-
pandas.CategoricalIndex.set_categories \
170-
pandas.CategoricalIndex.as_ordered \
171-
pandas.CategoricalIndex.as_unordered \
172-
pandas.CategoricalIndex.equals \
173-
pandas.IntervalIndex.values \
174-
pandas.IntervalIndex.to_tuples \
175-
pandas.MultiIndex.dtypes \
176-
pandas.MultiIndex.drop \
177112
pandas.DatetimeIndex.snap \
178-
pandas.DatetimeIndex.as_unit \
179-
pandas.DatetimeIndex.to_pydatetime \
180-
pandas.DatetimeIndex.to_series \
181-
pandas.DatetimeIndex.mean \
182-
pandas.DatetimeIndex.std \
183-
pandas.TimedeltaIndex \
184113
pandas.core.window.rolling.Rolling.max \
185114
pandas.core.window.rolling.Rolling.cov \
186115
pandas.core.window.rolling.Rolling.skew \
@@ -241,6 +170,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
241170
pandas.api.extensions.ExtensionArray.factorize \
242171
pandas.api.extensions.ExtensionArray.fillna \
243172
pandas.api.extensions.ExtensionArray.insert \
173+
pandas.api.extensions.ExtensionArray.interpolate \
244174
pandas.api.extensions.ExtensionArray.isin \
245175
pandas.api.extensions.ExtensionArray.isna \
246176
pandas.api.extensions.ExtensionArray.ravel \

ci/run_tests.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,9 @@ export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 429496
88
# May help reproduce flaky CI builds if set in subsequent runs
99
echo PYTHONHASHSEED=$PYTHONHASHSEED
1010

11-
if [[ "not network" == *"$PATTERN"* ]]; then
12-
export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4;
13-
fi
14-
1511
COVERAGE="-s --cov=pandas --cov-report=xml --cov-append --cov-config=pyproject.toml"
1612

17-
# If no X server is found, we use xvfb to emulate it
18-
if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then
19-
export DISPLAY=":0"
20-
XVFB="xvfb-run "
21-
fi
22-
23-
PYTEST_CMD="MESONPY_EDITABLE_VERBOSE=1 ${XVFB}pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"
13+
PYTEST_CMD="MESONPY_EDITABLE_VERBOSE=1 pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"
2414

2515
if [[ "$PATTERN" ]]; then
2616
PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\""

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
"footer_start": ["pandas_footer", "sphinx-version"],
241241
"github_url": "https://github.com/pandas-dev/pandas",
242242
"twitter_url": "https://twitter.com/pandas_dev",
243-
"analytics": {"google_analytics_id": "UA-27880019-2"},
243+
"analytics": {"google_analytics_id": "G-5RE31C1RNW"},
244244
"logo": {"image_dark": "https://pandas.pydata.org/static/img/pandas_white.svg"},
245245
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
246246
"switcher": {

doc/source/development/contributing_codebase.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ performance regressions. pandas is in the process of migrating to
861861
`asv benchmarks <https://github.com/airspeed-velocity/asv>`__
862862
to enable easy monitoring of the performance of critical pandas operations.
863863
These benchmarks are all found in the ``pandas/asv_bench`` directory, and the
864-
test results can be found `here <https://pandas.pydata.org/speed/pandas/>`__.
864+
test results can be found `here <https://asv-runner.github.io/asv-collection/pandas>`__.
865865

866866
To use all features of asv, you will need either ``conda`` or
867867
``virtualenv``. For more details please check the `asv installation

doc/source/reference/extensions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ objects.
5151
api.extensions.ExtensionArray.factorize
5252
api.extensions.ExtensionArray.fillna
5353
api.extensions.ExtensionArray.insert
54+
api.extensions.ExtensionArray.interpolate
5455
api.extensions.ExtensionArray.isin
5556
api.extensions.ExtensionArray.isna
5657
api.extensions.ExtensionArray.ravel

doc/source/user_guide/copy_on_write.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ following methods:
211211
- :meth:`DataFrame.astype` / :meth:`Series.astype`
212212
- :meth:`DataFrame.convert_dtypes` / :meth:`Series.convert_dtypes`
213213
- :meth:`DataFrame.join`
214+
- :meth:`DataFrame.eval`
214215
- :func:`concat`
215216
- :func:`merge`
216217

doc/source/user_guide/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2664,7 +2664,7 @@ Links can be extracted from cells along with the text using ``extract_links="all
26642664
"""
26652665
26662666
df = pd.read_html(
2667-
html_table,
2667+
StringIO(html_table),
26682668
extract_links="all"
26692669
)[0]
26702670
df

0 commit comments

Comments
 (0)