Skip to content

Commit 4bbdc6a

Browse files
authored
Updation of branch from pandas-dev/master
Updation of fork
2 parents da1ccc1 + 972f491 commit 4bbdc6a

File tree

132 files changed

+1977
-1269
lines changed

Some content is hidden

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

132 files changed

+1977
-1269
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ its way towards this goal.
3232
Here are just a few of the things that pandas does well:
3333

3434
- Easy handling of [**missing data**][missing-data] (represented as
35-
`NaN`) in floating point as well as non-floating point data
35+
`NaN`, `NA`, or `NaT`) in floating point as well as non-floating point data
3636
- Size mutability: columns can be [**inserted and
3737
deleted**][insertion-deletion] from DataFrame and higher dimensional
3838
objects

asv_bench/asv.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// The Pythons you'd like to test against. If not provided, defaults
2727
// to the current version of Python used to run `asv`.
2828
// "pythons": ["2.7", "3.4"],
29-
"pythons": ["3.6"],
29+
"pythons": ["3.8"],
3030

3131
// The matrix of dependencies to test. Each key is the name of a
3232
// package (in PyPI) and the values are version numbers. An empty

ci/deps/azure-37-locale.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ dependencies:
2121
- lxml
2222
- matplotlib>=3.3.0
2323
- moto
24+
- flask
2425
- nomkl
2526
- numexpr
2627
- numpy=1.16.*

ci/deps/azure-37-slow.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ dependencies:
2727
- python-dateutil
2828
- pytz
2929
- s3fs>=0.4.0
30+
- moto>=1.3.14
3031
- scipy
3132
- sqlalchemy
3233
- xlrd
3334
- xlsxwriter
3435
- xlwt
3536
- moto
37+
- flask

ci/deps/azure-38-locale.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ dependencies:
66

77
# tools
88
- cython>=0.29.16
9-
- pytest>=5.0.1,<6.0.0 # https://github.com/pandas-dev/pandas/issues/35620
9+
- pytest>=5.0.1
1010
- pytest-xdist>=1.21
11-
- pytest-asyncio
11+
- pytest-asyncio>=0.12.0
1212
- hypothesis>=3.58.0
1313
- pytest-azurepipelines
1414

1515
# pandas dependencies
1616
- beautifulsoup4
17+
- flask
1718
- html5lib
1819
- ipython
1920
- jinja2
@@ -32,6 +33,7 @@ dependencies:
3233
- xlrd
3334
- xlsxwriter
3435
- xlwt
36+
- moto
3537
- pyarrow>=0.15
3638
- pip
3739
- pip:

ci/deps/azure-windows-37.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,29 @@ dependencies:
88
# tools
99
- cython>=0.29.16
1010
- pytest>=5.0.1
11-
- pytest-xdist>=1.21,<2.0.0 # GH 35737
11+
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0
1313
- pytest-azurepipelines
1414

1515
# pandas dependencies
1616
- beautifulsoup4
1717
- bottleneck
18-
- fsspec>=0.7.4
18+
- fsspec>=0.8.0
1919
- gcsfs>=0.6.0
2020
- html5lib
2121
- jinja2
2222
- lxml
2323
- matplotlib=2.2.*
24-
- moto
24+
- moto>=1.3.14
25+
- flask
2526
- numexpr
2627
- numpy=1.16.*
2728
- openpyxl
2829
- pyarrow=0.15
2930
- pytables
3031
- python-dateutil
3132
- pytz
32-
- s3fs>=0.4.0
33+
- s3fs>=0.4.2
3334
- scipy
3435
- sqlalchemy
3536
- xlrd

ci/deps/azure-windows-38.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ dependencies:
88
# tools
99
- cython>=0.29.16
1010
- pytest>=5.0.1
11-
- pytest-xdist>=1.21,<2.0.0 # GH 35737
11+
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0
1313
- pytest-azurepipelines
1414

1515
# pandas dependencies
1616
- blosc
1717
- bottleneck
1818
- fastparquet>=0.3.2
19+
- flask
20+
- fsspec>=0.8.0
1921
- matplotlib=3.1.3
22+
- moto>=1.3.14
2023
- numba
2124
- numexpr
2225
- numpy=1.18.*
@@ -26,6 +29,7 @@ dependencies:
2629
- pytables
2730
- python-dateutil
2831
- pytz
32+
- s3fs>=0.4.0
2933
- scipy
3034
- xlrd
3135
- xlsxwriter

ci/deps/travis-37-arm64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ dependencies:
1717
- python-dateutil
1818
- pytz
1919
- pip
20+
- flask
2021
- pip:
2122
- moto

ci/deps/travis-37-cov.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ dependencies:
2323
- geopandas
2424
- html5lib
2525
- matplotlib
26-
- moto
26+
- moto>=1.3.14
27+
- flask
2728
- nomkl
2829
- numexpr
2930
- numpy=1.16.*

ci/deps/travis-37-locale.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ dependencies:
2121
- jinja2
2222
- lxml=4.3.0
2323
- matplotlib=3.0.*
24-
- moto
2524
- nomkl
2625
- numexpr
2726
- numpy
2827
- openpyxl
2928
- pandas-gbq=0.12.0
29+
- pyarrow>=0.17
3030
- psycopg2=2.7
31+
- pyarrow>=0.15.0 # GH #35813
3132
- pymysql=0.7.11
3233
- pytables
3334
- python-dateutil

ci/deps/travis-37.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ dependencies:
2020
- pyarrow
2121
- pytz
2222
- s3fs>=0.4.0
23+
- moto>=1.3.14
24+
- flask
2325
- tabulate
2426
- pyreadstat
2527
- pip
26-
- pip:
27-
- moto

doc/source/development/roadmap.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,32 @@ need to implement certain operations expected by pandas users (for example
5353
the algorithm used in, ``Series.str.upper``). That work may be done outside of
5454
pandas.
5555

56+
Consistent missing value handling
57+
---------------------------------
58+
59+
Currently, pandas handles missing data differently for different data types. We
60+
use different types to indicate that a value is missing (``np.nan`` for
61+
floating-point data, ``np.nan`` or ``None`` for object-dtype data -- typically
62+
strings or booleans -- with missing values, and ``pd.NaT`` for datetimelike
63+
data). Integer data cannot store missing data or are cast to float. In addition,
64+
pandas 1.0 introduced a new missing value sentinel, ``pd.NA``, which is being
65+
used for the experimental nullable integer, boolean, and string data types.
66+
67+
These different missing values have different behaviors in user-facing
68+
operations. Specifically, we introduced different semantics for the nullable
69+
data types for certain operations (e.g. propagating in comparison operations
70+
instead of comparing as False).
71+
72+
Long term, we want to introduce consistent missing data handling for all data
73+
types. This includes consistent behavior in all operations (indexing, arithmetic
74+
operations, comparisons, etc.). We want to eventually make the new semantics the
75+
default.
76+
77+
This has been discussed at
78+
`github #28095 <https://github.com/pandas-dev/pandas/issues/28095>`__ (and
79+
linked issues), and described in more detail in this
80+
`design doc <https://hackmd.io/@jorisvandenbossche/Sk0wMeAmB>`__.
81+
5682
Apache Arrow interoperability
5783
-----------------------------
5884

doc/source/getting_started/tutorials.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ Various tutorials
9494
* `Intro to pandas data structures, by Greg Reda <http://www.gregreda.com/2013/10/26/intro-to-pandas-data-structures/>`_
9595
* `Pandas and Python: Top 10, by Manish Amde <https://manishamde.github.io/blog/2013/03/07/pandas-and-python-top-10/>`_
9696
* `Pandas DataFrames Tutorial, by Karlijn Willems <https://www.datacamp.com/community/tutorials/pandas-tutorial-dataframe-python>`_
97-
* `A concise tutorial with real life examples <https://tutswiki.com/pandas-cookbook/chapter1>`_
97+
* `A concise tutorial with real life examples <https://tutswiki.com/pandas-cookbook/chapter1/>`_

doc/source/reference/frame.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ Sparse-dtype specific methods and attributes are provided under the
343343

344344
.. autosummary::
345345
:toctree: api/
346+
:template: autosummary/accessor_method.rst
346347

347348
DataFrame.sparse.from_spmatrix
348349
DataFrame.sparse.to_coo

doc/source/reference/series.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ Sparse-dtype specific methods and attributes are provided under the
522522

523523
.. autosummary::
524524
:toctree: api/
525+
:template: autosummary/accessor_method.rst
525526

526527
Series.sparse.from_coo
527528
Series.sparse.to_coo

doc/source/user_guide/timeseries.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,13 +2319,18 @@ you can use the ``tz_convert`` method.
23192319
Instead, the datetime needs to be localized using the ``localize`` method
23202320
on the ``pytz`` time zone object.
23212321

2322+
.. warning::
2323+
2324+
Be aware that for times in the future, correct conversion between time zones
2325+
(and UTC) cannot be guaranteed by any time zone library because a timezone's
2326+
offset from UTC may be changed by the respective government.
2327+
23222328
.. warning::
23232329

23242330
If you are using dates beyond 2038-01-18, due to current deficiencies
23252331
in the underlying libraries caused by the year 2038 problem, daylight saving time (DST) adjustments
23262332
to timezone aware dates will not be applied. If and when the underlying libraries are fixed,
2327-
the DST transitions will be applied. It should be noted though, that time zone data for far future time zones
2328-
are likely to be inaccurate, as they are simple extrapolations of the current set of (regularly revised) rules.
2333+
the DST transitions will be applied.
23292334

23302335
For example, for two dates that are in British Summer Time (and so would normally be GMT+1), both the following asserts evaluate as true:
23312336

doc/source/user_guide/visualization.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ A ``ValueError`` will be raised if there are any negative values in your data.
668668
plt.figure()
669669
670670
.. ipython:: python
671+
:okwarning:
671672
672673
series = pd.Series(3 * np.random.rand(4),
673674
index=['a', 'b', 'c', 'd'], name='series')
@@ -742,6 +743,7 @@ If you pass values whose sum total is less than 1.0, matplotlib draws a semicirc
742743
plt.figure()
743744
744745
.. ipython:: python
746+
:okwarning:
745747
746748
series = pd.Series([0.1] * 4, index=['a', 'b', 'c', 'd'], name='series2')
747749

doc/source/whatsnew/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Version 1.1
2424
.. toctree::
2525
:maxdepth: 2
2626

27+
v1.1.2
2728
v1.1.1
2829
v1.1.0
2930

doc/source/whatsnew/v0.25.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ with :attr:`numpy.nan` in the case of an empty :class:`DataFrame` (:issue:`26397
540540

541541
.. ipython:: python
542542
543-
df.describe()
543+
df.describe()
544544
545545
``__str__`` methods now call ``__repr__`` rather than vice versa
546546
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

doc/source/whatsnew/v1.1.1.rst

Lines changed: 15 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_111:
22

3-
What's new in 1.1.1 (?)
4-
-----------------------
3+
What's new in 1.1.1 (August 20, 2020)
4+
-------------------------------------
55

66
These are the changes in pandas 1.1.1. See :ref:`release` for a full changelog
77
including other versions of pandas.
@@ -15,20 +15,23 @@ including other versions of pandas.
1515
Fixed regressions
1616
~~~~~~~~~~~~~~~~~
1717

18+
- Fixed regression in :meth:`CategoricalIndex.format` where, when stringified scalars had different lengths, the shorter string would be right-filled with spaces, so it had the same length as the longest string (:issue:`35439`)
19+
- Fixed regression in :meth:`Series.truncate` when trying to truncate a single-element series (:issue:`35544`)
1820
- Fixed regression where :meth:`DataFrame.to_numpy` would raise a ``RuntimeError`` for mixed dtypes when converting to ``str`` (:issue:`35455`)
1921
- Fixed regression where :func:`read_csv` would raise a ``ValueError`` when ``pandas.options.mode.use_inf_as_na`` was set to ``True`` (:issue:`35493`)
2022
- Fixed regression where :func:`pandas.testing.assert_series_equal` would raise an error when non-numeric dtypes were passed with ``check_exact=True`` (:issue:`35446`)
21-
- Fixed regression in :class:`pandas.core.groupby.RollingGroupby` where column selection was ignored (:issue:`35486`)
22-
- Fixed regression where :meth:`DataFrame.interpolate` would raise a ``TypeError`` when the :class:`DataFrame` was empty (:issue:`35598`).
23+
- Fixed regression in ``.groupby(..).rolling(..)`` where column selection was ignored (:issue:`35486`)
24+
- Fixed regression where :meth:`DataFrame.interpolate` would raise a ``TypeError`` when the :class:`DataFrame` was empty (:issue:`35598`)
2325
- Fixed regression in :meth:`DataFrame.shift` with ``axis=1`` and heterogeneous dtypes (:issue:`35488`)
2426
- Fixed regression in :meth:`DataFrame.diff` with read-only data (:issue:`35559`)
2527
- Fixed regression in ``.groupby(..).rolling(..)`` where a segfault would occur with ``center=True`` and an odd number of values (:issue:`35552`)
2628
- Fixed regression in :meth:`DataFrame.apply` where functions that altered the input in-place only operated on a single row (:issue:`35462`)
2729
- Fixed regression in :meth:`DataFrame.reset_index` would raise a ``ValueError`` on empty :class:`DataFrame` with a :class:`MultiIndex` with a ``datetime64`` dtype level (:issue:`35606`, :issue:`35657`)
28-
- Fixed regression where :meth:`DataFrame.merge_asof` would raise a ``UnboundLocalError`` when ``left_index`` , ``right_index`` and ``tolerance`` were set (:issue:`35558`)
30+
- Fixed regression where :func:`pandas.merge_asof` would raise a ``UnboundLocalError`` when ``left_index``, ``right_index`` and ``tolerance`` were set (:issue:`35558`)
2931
- Fixed regression in ``.groupby(..).rolling(..)`` where a custom ``BaseIndexer`` would be ignored (:issue:`35557`)
3032
- Fixed regression in :meth:`DataFrame.replace` and :meth:`Series.replace` where compiled regular expressions would be ignored during replacement (:issue:`35680`)
31-
- Fixed regression in :meth:`~pandas.core.groupby.DataFrameGroupBy.agg` where a list of functions would produce the wrong results if at least one of the functions did not aggregate. (:issue:`35490`)
33+
- Fixed regression in :meth:`~pandas.core.groupby.DataFrameGroupBy.aggregate` where a list of functions would produce the wrong results if at least one of the functions did not aggregate (:issue:`35490`)
34+
- Fixed memory usage issue when instantiating large :class:`pandas.arrays.StringArray` (:issue:`35499`)
3235

3336
.. ---------------------------------------------------------------------------
3437
@@ -37,50 +40,11 @@ Fixed regressions
3740
Bug fixes
3841
~~~~~~~~~
3942

40-
- Bug in ``Styler`` whereby `cell_ids` argument had no effect due to other recent changes (:issue:`35588`) (:issue:`35663`).
41-
- Bug in :func:`pandas.testing.assert_series_equal` and :func:`pandas.testing.assert_frame_equal` where extension dtypes were not ignored when ``check_dtypes`` was set to ``False`` (:issue:`35715`).
42-
43-
Categorical
44-
^^^^^^^^^^^
45-
46-
- Bug in :meth:`CategoricalIndex.format` where, when stringified scalars had different lengths, the shorter string would be right-filled with spaces, so it had the same length as the longest string (:issue:`35439`)
47-
48-
49-
**Datetimelike**
50-
51-
-
52-
-
53-
54-
**Timedelta**
55-
56-
- Bug in :meth:`to_timedelta` fails when arg is a :class:`Series` with `Int64` dtype containing null values (:issue:`35574`)
57-
58-
59-
**Numeric**
60-
61-
-
62-
-
63-
64-
**Groupby/resample/rolling**
65-
66-
- Bug in :class:`pandas.core.groupby.RollingGroupby` where passing ``closed`` with column selection would raise a ``ValueError`` (:issue:`35549`)
67-
68-
**Plotting**
69-
70-
-
71-
72-
**Indexing**
73-
74-
- Bug in :meth:`Series.truncate` when trying to truncate a single-element series (:issue:`35544`)
75-
76-
**DataFrame**
77-
- Bug in :class:`DataFrame` constructor failing to raise ``ValueError`` in some cases when data and index have mismatched lengths (:issue:`33437`)
78-
-
79-
80-
**Strings**
81-
82-
- fix memory usage issue when instantiating large :class:`pandas.arrays.StringArray` (:issue:`35499`)
83-
43+
- Bug in :class:`~pandas.io.formats.style.Styler` whereby ``cell_ids`` argument had no effect due to other recent changes (:issue:`35588`) (:issue:`35663`)
44+
- Bug in :func:`pandas.testing.assert_series_equal` and :func:`pandas.testing.assert_frame_equal` where extension dtypes were not ignored when ``check_dtypes`` was set to ``False`` (:issue:`35715`)
45+
- Bug in :meth:`to_timedelta` fails when ``arg`` is a :class:`Series` with ``Int64`` dtype containing null values (:issue:`35574`)
46+
- Bug in ``.groupby(..).rolling(..)`` where passing ``closed`` with column selection would raise a ``ValueError`` (:issue:`35549`)
47+
- Bug in :class:`DataFrame` constructor failing to raise ``ValueError`` in some cases when ``data`` and ``index`` have mismatched lengths (:issue:`33437`)
8448

8549
.. ---------------------------------------------------------------------------
8650
@@ -89,4 +53,4 @@ Categorical
8953
Contributors
9054
~~~~~~~~~~~~
9155

92-
.. contributors:: v1.1.0..v1.1.1|HEAD
56+
.. contributors:: v1.1.0..v1.1.1

0 commit comments

Comments
 (0)