Skip to content

Commit 4cce86d

Browse files
authored
Merge branch 'master' into doc-multiindex-get_slice_bound
2 parents de298f5 + 3577b5a commit 4cce86d

Some content is hidden

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

84 files changed

+1060
-967
lines changed

ci/azure/windows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ jobs:
3131
- bash: |
3232
source activate pandas-dev
3333
conda list
34-
ci\\incremental\\build.cmd
34+
python setup.py build_ext -q -i
35+
python -m pip install --no-build-isolation -e .
3536
displayName: 'Build'
3637
- bash: |
3738
source activate pandas-dev

ci/code_checks.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
5252
black --version
5353

5454
MSG='Checking black formatting' ; echo $MSG
55-
black . --check
55+
black . --check
5656
RET=$(($RET + $?)) ; echo $MSG "DONE"
5757

5858
# `setup.cfg` contains the list of error codes that are being ignored in flake8
@@ -104,7 +104,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
104104
isort --version-number
105105

106106
# Imports - Check formatting using isort see setup.cfg for settings
107-
MSG='Check import format using isort ' ; echo $MSG
107+
MSG='Check import format using isort' ; echo $MSG
108108
ISORT_CMD="isort --recursive --check-only pandas asv_bench"
109109
if [[ "$GITHUB_ACTIONS" == "true" ]]; then
110110
eval $ISORT_CMD | awk '{print "##[error]" $0}'; RET=$(($RET + ${PIPESTATUS[0]}))
@@ -203,6 +203,10 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
203203
invgrep -R --include=*.{py,pyx} '\.__class__' pandas
204204
RET=$(($RET + $?)) ; echo $MSG "DONE"
205205

206+
MSG='Check for use of xrange instead of range' ; echo $MSG
207+
invgrep -R --include=*.{py,pyx} 'xrange' pandas
208+
RET=$(($RET + $?)) ; echo $MSG "DONE"
209+
206210
MSG='Check that no file in the repo contains trailing whitespaces' ; echo $MSG
207211
INVGREP_APPEND=" <- trailing whitespaces found"
208212
invgrep -RI --exclude=\*.{svg,c,cpp,html,js} --exclude-dir=env "\s$" *

ci/incremental/build.cmd

Lines changed: 0 additions & 9 deletions
This file was deleted.

ci/run_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ sh -c "$PYTEST_CMD"
3838

3939
if [[ "$COVERAGE" && $? == 0 && "$TRAVIS_BRANCH" == "master" ]]; then
4040
echo "uploading coverage"
41-
echo "bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME"
42-
bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME
41+
echo "bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME"
42+
bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME
4343
fi

doc/source/_static/favicon.ico

-3.81 KB
Binary file not shown.

doc/source/conf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@
204204
# Theme options are theme-specific and customize the look and feel of a theme
205205
# further. For a list of options available for each theme, see the
206206
# documentation.
207-
# html_theme_options = {}
207+
html_theme_options = {
208+
"external_links": [],
209+
"github_url": "https://github.com/pandas-dev/pandas",
210+
"twitter_url": "https://twitter.com/pandas_dev",
211+
}
208212

209213
# Add any paths that contain custom themes here, relative to this directory.
210214
# html_theme_path = ["themes"]
@@ -228,7 +232,7 @@
228232
# The name of an image file (within the static path) to use as favicon of the
229233
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
230234
# pixels large.
231-
html_favicon = os.path.join(html_static_path[0], "favicon.ico")
235+
html_favicon = "../../web/pandas/static/img/favicon.ico"
232236

233237
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
234238
# using the given strftime format.

doc/source/user_guide/io.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4763,10 +4763,10 @@ Parquet supports partitioning of data based on the values of one or more columns
47634763
.. ipython:: python
47644764
47654765
df = pd.DataFrame({'a': [0, 0, 1, 1], 'b': [0, 1, 0, 1]})
4766-
df.to_parquet(fname='test', engine='pyarrow',
4766+
df.to_parquet(path='test', engine='pyarrow',
47674767
partition_cols=['a'], compression=None)
47684768
4769-
The `fname` specifies the parent directory to which data will be saved.
4769+
The `path` specifies the parent directory to which data will be saved.
47704770
The `partition_cols` are the column names by which the dataset will be partitioned.
47714771
Columns are partitioned in the order they are given. The partition splits are
47724772
determined by the unique values in the partition columns.
@@ -4828,7 +4828,6 @@ See also some :ref:`cookbook examples <cookbook.sql>` for some advanced strategi
48284828
The key functions are:
48294829

48304830
.. autosummary::
4831-
:toctree: ../reference/api/
48324831

48334832
read_sql_table
48344833
read_sql_query

doc/source/user_guide/text.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ These are places where the behavior of ``StringDtype`` objects differ from
7474
l. For ``StringDtype``, :ref:`string accessor methods<api.series.str>`
7575
that return **numeric** output will always return a nullable integer dtype,
7676
rather than either int or float dtype, depending on the presence of NA values.
77+
Methods returning **boolean** output will return a nullable boolean dtype.
7778

7879
.. ipython:: python
7980
@@ -89,7 +90,13 @@ l. For ``StringDtype``, :ref:`string accessor methods<api.series.str>`
8990
s.astype(object).str.count("a")
9091
s.astype(object).dropna().str.count("a")
9192
92-
When NA values are present, the output dtype is float64.
93+
When NA values are present, the output dtype is float64. Similarly for
94+
methods returning boolean values.
95+
96+
.. ipython:: python
97+
98+
s.str.isdigit()
99+
s.str.match("a")
93100
94101
2. Some string methods, like :meth:`Series.str.decode` are not available
95102
on ``StringArray`` because ``StringArray`` only holds strings, not

doc/source/whatsnew/v1.0.0.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,8 @@ Deprecations
502502
- :func:`pandas.json_normalize` is now exposed in the top-level namespace.
503503
Usage of ``json_normalize`` as ``pandas.io.json.json_normalize`` is now deprecated and
504504
it is recommended to use ``json_normalize`` as :func:`pandas.json_normalize` instead (:issue:`27586`).
505-
-
505+
- :meth:`DataFrame.to_stata`, :meth:`DataFrame.to_feather`, and :meth:`DataFrame.to_parquet` argument "fname" is deprecated, use "path" instead (:issue:`23574`)
506+
506507

507508
.. _whatsnew_1000.prior_deprecations:
508509

@@ -711,7 +712,7 @@ Datetimelike
711712
- Bug in :func:`pandas.to_datetime` when called with ``None`` raising ``TypeError`` instead of returning ``NaT`` (:issue:`30011`)
712713
- Bug in :func:`pandas.to_datetime` failing for `deques` when using ``cache=True`` (the default) (:issue:`29403`)
713714
- Bug in :meth:`Series.item` with ``datetime64`` or ``timedelta64`` dtype, :meth:`DatetimeIndex.item`, and :meth:`TimedeltaIndex.item` returning an integer instead of a :class:`Timestamp` or :class:`Timedelta` (:issue:`30175`)
714-
-
715+
- Bug in :class:`DatetimeIndex` addition when adding a non-optimized :class:`DateOffset` incorrectly dropping timezone information (:issue:`30336`)
715716

716717
Timedelta
717718
^^^^^^^^^

pandas/_libs/parsers.pyx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,26 @@ def _ensure_encoded(list lst):
13671367
# common NA values
13681368
# no longer excluding inf representations
13691369
# '1.#INF','-1.#INF', '1.#INF000000',
1370-
_NA_VALUES = _ensure_encoded(list(icom._NA_VALUES))
1370+
STR_NA_VALUES = {
1371+
"-1.#IND",
1372+
"1.#QNAN",
1373+
"1.#IND",
1374+
"-1.#QNAN",
1375+
"#N/A N/A",
1376+
"#N/A",
1377+
"N/A",
1378+
"n/a",
1379+
"NA",
1380+
"#NA",
1381+
"NULL",
1382+
"null",
1383+
"NaN",
1384+
"-NaN",
1385+
"nan",
1386+
"-nan",
1387+
"",
1388+
}
1389+
_NA_VALUES = _ensure_encoded(list(STR_NA_VALUES))
13711390

13721391

13731392
def _maybe_upcast(arr):

0 commit comments

Comments
 (0)