Skip to content

Commit 9f4bea5

Browse files
Merge branch 'main' into test_numpy_complex2
2 parents 5210c8b + 7cd8ae5 commit 9f4bea5

File tree

243 files changed

+3006
-2203
lines changed

Some content is hidden

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

243 files changed

+3006
-2203
lines changed

ci/code_checks.sh

Lines changed: 11 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@
1616

1717
set -uo pipefail
1818

19-
[[ -z "$1" || "$1" == "code" || "$1" == "doctests" || "$1" == "docstrings" || "$1" == "single-docs" || "$1" == "notebooks" ]] || \
19+
if [[ -v 1 ]]; then
20+
CHECK=$1
21+
else
22+
# script will fail if it uses an unset variable (i.e. $1 is not provided)
23+
CHECK=""
24+
fi
25+
26+
[[ -z "$CHECK" || "$CHECK" == "code" || "$CHECK" == "doctests" || "$CHECK" == "docstrings" || "$CHECK" == "single-docs" || "$CHECK" == "notebooks" ]] || \
2027
{ echo "Unknown command $1. Usage: $0 [code|doctests|docstrings|single-docs|notebooks]"; exit 9999; }
2128

2229
BASE_DIR="$(dirname $0)/.."
2330
RET=0
24-
CHECK=$1
2531

2632
### CODE ###
2733
if [[ -z "$CHECK" || "$CHECK" == "code" ]]; then
@@ -59,110 +65,28 @@ fi
5965
### DOCSTRINGS ###
6066
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
6167

62-
MSG='Validate docstrings (EX01, EX02, EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT02, RT04, RT05, SA02, SA03, SA04, SS01, SS02, SS03, SS04, SS05, SS06)' ; echo $MSG
63-
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01,EX02,EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT02,RT04,RT05,SA02,SA03,SA04,SS01,SS02,SS03,SS04,SS05,SS06
68+
MSG='Validate docstrings (EX01, EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT02, RT04, RT05, SA02, SA03, SA04, SS01, SS02, SS03, SS04, SS05, SS06)' ; echo $MSG
69+
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01,EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT02,RT04,RT05,SA02,SA03,SA04,SS01,SS02,SS03,SS04,SS05,SS06
6470
RET=$(($RET + $?)) ; echo $MSG "DONE"
6571

6672
MSG='Partially validate docstrings (EX03)' ; echo $MSG
6773
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX03 --ignore_functions \
68-
pandas.Series.dt.day_name \
69-
pandas.Series.str.len \
70-
pandas.Series.cat.set_categories \
71-
pandas.Series.plot.bar \
72-
pandas.Series.plot.hist \
7374
pandas.Series.plot.line \
7475
pandas.Series.to_sql \
75-
pandas.Series.to_latex \
76-
pandas.errors.CategoricalConversionWarning \
77-
pandas.errors.ChainedAssignmentError \
78-
pandas.errors.ClosedFileError \
79-
pandas.errors.DatabaseError \
80-
pandas.errors.IndexingError \
81-
pandas.errors.InvalidColumnName \
82-
pandas.errors.NumExprClobberingError \
83-
pandas.errors.PossibleDataLossError \
84-
pandas.errors.PossiblePrecisionLoss \
85-
pandas.errors.SettingWithCopyError \
8676
pandas.errors.SettingWithCopyWarning \
8777
pandas.errors.SpecificationError \
8878
pandas.errors.UndefinedVariableError \
89-
pandas.errors.ValueLabelTypeMismatch \
90-
pandas.Timestamp.ceil \
91-
pandas.Timestamp.floor \
92-
pandas.Timestamp.round \
93-
pandas.read_pickle \
94-
pandas.ExcelWriter \
9579
pandas.read_json \
96-
pandas.io.json.build_table_schema \
97-
pandas.DataFrame.to_latex \
9880
pandas.io.formats.style.Styler.to_latex \
9981
pandas.read_parquet \
10082
pandas.DataFrame.to_sql \
101-
pandas.read_stata \
102-
pandas.core.resample.Resampler.pipe \
103-
pandas.core.resample.Resampler.fillna \
104-
pandas.core.resample.Resampler.interpolate \
105-
pandas.plotting.scatter_matrix \
106-
pandas.pivot \
107-
pandas.merge_asof \
108-
pandas.wide_to_long \
109-
pandas.Index.rename \
110-
pandas.Index.droplevel \
111-
pandas.Index.isin \
112-
pandas.CategoricalIndex.set_categories \
113-
pandas.MultiIndex.names \
114-
pandas.MultiIndex.droplevel \
115-
pandas.IndexSlice \
116-
pandas.DatetimeIndex.month_name \
117-
pandas.DatetimeIndex.day_name \
118-
pandas.core.window.rolling.Rolling.corr \
119-
pandas.Grouper \
120-
pandas.core.groupby.SeriesGroupBy.apply \
121-
pandas.core.groupby.DataFrameGroupBy.apply \
122-
pandas.core.groupby.SeriesGroupBy.transform \
123-
pandas.core.groupby.SeriesGroupBy.pipe \
124-
pandas.core.groupby.DataFrameGroupBy.pipe \
125-
pandas.core.groupby.DataFrameGroupBy.describe \
126-
pandas.core.groupby.DataFrameGroupBy.idxmax \
127-
pandas.core.groupby.DataFrameGroupBy.idxmin \
128-
pandas.core.groupby.DataFrameGroupBy.value_counts \
129-
pandas.core.groupby.SeriesGroupBy.describe \
130-
pandas.core.groupby.DataFrameGroupBy.boxplot \
131-
pandas.core.groupby.DataFrameGroupBy.hist \
13283
pandas.io.formats.style.Styler.map \
13384
pandas.io.formats.style.Styler.apply_index \
13485
pandas.io.formats.style.Styler.map_index \
13586
pandas.io.formats.style.Styler.format \
136-
pandas.io.formats.style.Styler.format_index \
137-
pandas.io.formats.style.Styler.relabel_index \
138-
pandas.io.formats.style.Styler.hide \
139-
pandas.io.formats.style.Styler.set_td_classes \
140-
pandas.io.formats.style.Styler.set_tooltips \
141-
pandas.io.formats.style.Styler.set_uuid \
142-
pandas.io.formats.style.Styler.pipe \
143-
pandas.io.formats.style.Styler.highlight_between \
14487
pandas.io.formats.style.Styler.highlight_quantile \
14588
pandas.io.formats.style.Styler.background_gradient \
146-
pandas.io.formats.style.Styler.text_gradient \
147-
pandas.DataFrame.values \
148-
pandas.DataFrame.loc \
149-
pandas.DataFrame.iloc \
150-
pandas.DataFrame.groupby \
151-
pandas.DataFrame.describe \
152-
pandas.DataFrame.skew \
153-
pandas.DataFrame.var \
154-
pandas.DataFrame.idxmax \
155-
pandas.DataFrame.idxmin \
156-
pandas.DataFrame.last \
157-
pandas.DataFrame.pivot \
158-
pandas.DataFrame.sort_values \
159-
pandas.DataFrame.tz_convert \
160-
pandas.DataFrame.tz_localize \
161-
pandas.DataFrame.plot.bar \
162-
pandas.DataFrame.plot.hexbin \
163-
pandas.DataFrame.plot.hist \
164-
pandas.DataFrame.plot.line \
165-
pandas.DataFrame.hist \
89+
pandas.io.formats.style.Styler.text_gradient
16690
RET=$(($RET + $?)) ; echo $MSG "DONE"
16791

16892
fi

doc/source/development/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Bug reports and enhancement requests
1919
====================================
2020

2121
Bug reports and enhancement requests are an important part of making pandas more stable and
22-
are curated though Github issues. When reporting and issue or request, please select the `appropriate
22+
are curated though Github issues. When reporting an issue or request, please select the `appropriate
2323
category and fill out the issue form fully <https://github.com/pandas-dev/pandas/issues/new/choose>`_
2424
to ensure others and the core development team can fully understand the scope of the issue.
2525

doc/source/development/contributing_docstring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ Each shared docstring will have a base template with variables, like
939939
Finally, docstrings can also be appended to with the ``doc`` decorator.
940940

941941
In this example, we'll create a parent docstring normally (this is like
942-
``pandas.core.generic.NDFrame``. Then we'll have two children (like
942+
``pandas.core.generic.NDFrame``). Then we'll have two children (like
943943
``pandas.core.series.Series`` and ``pandas.core.frame.DataFrame``). We'll
944944
substitute the class names in this docstring.
945945

doc/source/reference/series.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ Reindexing / selection / label manipulation
177177
:toctree: api/
178178

179179
Series.align
180+
Series.case_when
180181
Series.drop
181182
Series.droplevel
182183
Series.drop_duplicates

doc/source/user_guide/io.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ option parameter:
17041704

17051705
.. code-block:: python
17061706
1707-
storage_options = {"client_kwargs": {"endpoint_url": "http://127.0.0.1:5555"}}}
1707+
storage_options = {"client_kwargs": {"endpoint_url": "http://127.0.0.1:5555"}}
17081708
df = pd.read_json("s3://pandas-test/test-1", storage_options=storage_options)
17091709
17101710
More sample configurations and documentation can be found at `S3Fs documentation
@@ -3015,14 +3015,15 @@ Read in the content of the "books.xml" as instance of ``StringIO`` or
30153015
Even read XML from AWS S3 buckets such as NIH NCBI PMC Article Datasets providing
30163016
Biomedical and Life Science Jorurnals:
30173017

3018-
.. ipython:: python
3019-
:okwarning:
3018+
.. code-block:: python
30203019
3021-
df = pd.read_xml(
3022-
"s3://pmc-oa-opendata/oa_comm/xml/all/PMC1236943.xml",
3023-
xpath=".//journal-meta",
3024-
)
3025-
df
3020+
>>> df = pd.read_xml(
3021+
... "s3://pmc-oa-opendata/oa_comm/xml/all/PMC1236943.xml",
3022+
... xpath=".//journal-meta",
3023+
...)
3024+
>>> df
3025+
journal-id journal-title issn publisher
3026+
0 Cardiovasc Ultrasound Cardiovascular Ultrasound 1476-7120 NaN
30263027
30273028
With `lxml`_ as default ``parser``, you access the full-featured XML library
30283029
that extends Python's ElementTree API. One powerful tool is ability to query

0 commit comments

Comments
 (0)