Skip to content

Commit 76a015a

Browse files
committed
Revert "Merge remote-tracking branch 'upstream/master'"
This reverts commit 561096c, reversing changes made to b492293.
1 parent 561096c commit 76a015a

File tree

267 files changed

+3078
-4938
lines changed

Some content is hidden

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

267 files changed

+3078
-4938
lines changed

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/condaforge/miniforge3
1+
FROM continuumio/miniconda3
22

33
# if you forked pandas, you can pass in your own GitHub username to use your fork
44
# i.e. gh_username=myname
@@ -15,6 +15,10 @@ RUN apt-get update \
1515
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
1616
&& apt-get -y install git iproute2 procps iproute2 lsb-release \
1717
#
18+
# Install C compilers (gcc not enough, so just went with build-essential which admittedly might be overkill),
19+
# needed to build pandas C extensions
20+
&& apt-get -y install build-essential \
21+
#
1822
# cleanup
1923
&& apt-get autoremove -y \
2024
&& apt-get clean -y \
@@ -35,14 +39,9 @@ RUN mkdir "$pandas_home" \
3539
# we just update the base/root one from the 'environment.yml' file instead of creating a new one.
3640
#
3741
# Set up environment
38-
RUN conda install -y mamba
39-
RUN mamba env update -n base -f "$pandas_home/environment.yml"
42+
RUN conda env update -n base -f "$pandas_home/environment.yml"
4043

4144
# Build C extensions and pandas
42-
SHELL ["/bin/bash", "-c"]
43-
RUN . /opt/conda/etc/profile.d/conda.sh \
44-
&& conda activate base \
45-
&& cd "$pandas_home" \
46-
&& export \
45+
RUN cd "$pandas_home" \
4746
&& python setup.py build_ext -j 4 \
4847
&& python -m pip install -e .

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,24 @@ Here are just a few of the things that pandas does well:
6363
date shifting and lagging
6464

6565

66-
[missing-data]: https://pandas.pydata.org/pandas-docs/stable/user_guide/missing_data.html
67-
[insertion-deletion]: https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html#column-selection-addition-deletion
68-
[alignment]: https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html?highlight=alignment#intro-to-data-structures
69-
[groupby]: https://pandas.pydata.org/pandas-docs/stable/user_guide/groupby.html#group-by-split-apply-combine
70-
[conversion]: https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html#dataframe
71-
[slicing]: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#slicing-ranges
72-
[fancy-indexing]: https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#advanced
73-
[subsetting]: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#boolean-indexing
74-
[merging]: https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html#database-style-dataframe-or-named-series-joining-merging
75-
[joining]: https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html#joining-on-index
76-
[reshape]: https://pandas.pydata.org/pandas-docs/stable/user_guide/reshaping.html
77-
[pivot-table]: https://pandas.pydata.org/pandas-docs/stable/user_guide/reshaping.html
78-
[mi]: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#hierarchical-indexing-multiindex
79-
[flat-files]: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#csv-text-files
80-
[excel]: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#excel-files
81-
[db]: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#sql-queries
82-
[hdfstore]: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#hdf5-pytables
83-
[timeseries]: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#time-series-date-functionality
66+
[missing-data]: https://pandas.pydata.org/pandas-docs/stable/missing_data.html#working-with-missing-data
67+
[insertion-deletion]: https://pandas.pydata.org/pandas-docs/stable/dsintro.html#column-selection-addition-deletion
68+
[alignment]: https://pandas.pydata.org/pandas-docs/stable/dsintro.html?highlight=alignment#intro-to-data-structures
69+
[groupby]: https://pandas.pydata.org/pandas-docs/stable/groupby.html#group-by-split-apply-combine
70+
[conversion]: https://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe
71+
[slicing]: https://pandas.pydata.org/pandas-docs/stable/indexing.html#slicing-ranges
72+
[fancy-indexing]: https://pandas.pydata.org/pandas-docs/stable/indexing.html#advanced-indexing-with-ix
73+
[subsetting]: https://pandas.pydata.org/pandas-docs/stable/indexing.html#boolean-indexing
74+
[merging]: https://pandas.pydata.org/pandas-docs/stable/merging.html#database-style-dataframe-joining-merging
75+
[joining]: https://pandas.pydata.org/pandas-docs/stable/merging.html#joining-on-index
76+
[reshape]: https://pandas.pydata.org/pandas-docs/stable/reshaping.html#reshaping-and-pivot-tables
77+
[pivot-table]: https://pandas.pydata.org/pandas-docs/stable/reshaping.html#pivot-tables-and-cross-tabulations
78+
[mi]: https://pandas.pydata.org/pandas-docs/stable/indexing.html#hierarchical-indexing-multiindex
79+
[flat-files]: https://pandas.pydata.org/pandas-docs/stable/io.html#csv-text-files
80+
[excel]: https://pandas.pydata.org/pandas-docs/stable/io.html#excel-files
81+
[db]: https://pandas.pydata.org/pandas-docs/stable/io.html#sql-queries
82+
[hdfstore]: https://pandas.pydata.org/pandas-docs/stable/io.html#hdf5-pytables
83+
[timeseries]: https://pandas.pydata.org/pandas-docs/stable/timeseries.html#time-series-date-functionality
8484

8585
## Where to get it
8686
The source code is currently hosted on GitHub at:
@@ -154,7 +154,7 @@ For usage questions, the best place to go to is [StackOverflow](https://stackove
154154
Further, general questions and discussions can also take place on the [pydata mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata).
155155

156156
## Discussion and Development
157-
Most development discussions take place on GitHub in this repo. Further, the [pandas-dev mailing list](https://mail.python.org/mailman/listinfo/pandas-dev) can also be used for specialized discussions or design issues, and a [Gitter channel](https://gitter.im/pydata/pandas) is available for quick development related questions.
157+
Most development discussions take place on github in this repo. Further, the [pandas-dev mailing list](https://mail.python.org/mailman/listinfo/pandas-dev) can also be used for specialized discussions or design issues, and a [Gitter channel](https://gitter.im/pydata/pandas) is available for quick development related questions.
158158

159159
## Contributing to pandas [![Open Source Helpers](https://www.codetriage.com/pandas-dev/pandas/badges/users.svg)](https://www.codetriage.com/pandas-dev/pandas)
160160

asv_bench/benchmarks/indexing.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -358,14 +358,6 @@ def time_assign_with_setitem(self):
358358
for i in range(100):
359359
self.df[i] = np.random.randn(self.N)
360360

361-
def time_assign_list_like_with_setitem(self):
362-
np.random.seed(1234)
363-
self.df[list(range(100))] = np.random.randn(self.N, 100)
364-
365-
def time_assign_list_of_columns_concat(self):
366-
df = DataFrame(np.random.randn(self.N, 100))
367-
concat([self.df, df], axis=1)
368-
369361

370362
class ChainIndexing:
371363

asv_bench/benchmarks/rolling.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -225,20 +225,6 @@ def time_rolling_offset(self, method):
225225
getattr(self.groupby_roll_offset, method)()
226226

227227

228-
class GroupbyLargeGroups:
229-
# https://github.com/pandas-dev/pandas/issues/38038
230-
# specific example where the rolling operation on a larger dataframe
231-
# is relatively cheap (few but large groups), but creation of
232-
# MultiIndex of result can be expensive
233-
234-
def setup(self):
235-
N = 100000
236-
self.df = pd.DataFrame({"A": [1, 2] * int(N / 2), "B": np.random.randn(N)})
237-
238-
def time_rolling_multiindex_creation(self):
239-
self.df.groupby("A").rolling(3).mean()
240-
241-
242228
class GroupbyEWM:
243229

244230
params = ["cython", "numba"]

ci/deps/azure-38-numpydev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212

1313
# pandas dependencies
1414
- pytz
15-
- pip=20.2
15+
- pip
1616
- pip:
1717
- cython==0.29.21 # GH#34014
1818
- "git+git://github.com/dateutil/dateutil.git"

doc/source/development/contributing.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ Creating a development environment
147147

148148
To test out code changes, you'll need to build pandas from source, which
149149
requires a C/C++ compiler and Python environment. If you're making documentation
150-
changes, you can skip to :ref:`contributing.documentation` but if you skip
151-
creating the development environment you won't be able to build the documentation
152-
locally before pushing your changes.
150+
changes, you can skip to :ref:`contributing.documentation` but you won't be able
151+
to build the documentation locally before pushing your changes.
153152

154153
Using a Docker container
155154
~~~~~~~~~~~~~~~~~~~~~~~~

doc/source/reference/series.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ Combining / comparing / joining / merging
252252

253253
Series.append
254254
Series.compare
255+
Series.replace
255256
Series.update
256257

257258
Time Series-related

doc/source/user_guide/io.rst

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,21 +1577,19 @@ value will be an iterable object of type ``TextFileReader``:
15771577

15781578
.. ipython:: python
15791579
1580-
with pd.read_csv("tmp.sv", sep="|", chunksize=4) as reader:
1581-
reader
1582-
for chunk in reader:
1583-
print(chunk)
1580+
reader = pd.read_csv("tmp.sv", sep="|", chunksize=4)
1581+
reader
15841582
1585-
.. versionchanged:: 1.2
1583+
for chunk in reader:
1584+
print(chunk)
15861585
1587-
``read_csv/json/sas`` return a context-manager when iterating through a file.
15881586
15891587
Specifying ``iterator=True`` will also return the ``TextFileReader`` object:
15901588

15911589
.. ipython:: python
15921590
1593-
with pd.read_csv("tmp.sv", sep="|", iterator=True) as reader:
1594-
reader.get_chunk(5)
1591+
reader = pd.read_csv("tmp.sv", sep="|", iterator=True)
1592+
reader.get_chunk(5)
15951593
15961594
.. ipython:: python
15971595
:suppress:
@@ -2240,10 +2238,10 @@ For line-delimited json files, pandas can also return an iterator which reads in
22402238
df.to_json(orient="records", lines=True)
22412239
22422240
# reader is an iterator that returns ``chunksize`` lines each iteration
2243-
with pd.read_json(StringIO(jsonl), lines=True, chunksize=1) as reader:
2244-
reader
2245-
for chunk in reader:
2246-
print(chunk)
2241+
reader = pd.read_json(StringIO(jsonl), lines=True, chunksize=1)
2242+
reader
2243+
for chunk in reader:
2244+
print(chunk)
22472245
22482246
.. _io.table_schema:
22492247

@@ -5473,19 +5471,19 @@ object can be used as an iterator.
54735471

54745472
.. ipython:: python
54755473
5476-
with pd.read_stata("stata.dta", chunksize=3) as reader:
5477-
for df in reader:
5478-
print(df.shape)
5474+
reader = pd.read_stata("stata.dta", chunksize=3)
5475+
for df in reader:
5476+
print(df.shape)
54795477
54805478
For more fine-grained control, use ``iterator=True`` and specify
54815479
``chunksize`` with each call to
54825480
:func:`~pandas.io.stata.StataReader.read`.
54835481

54845482
.. ipython:: python
54855483
5486-
with pd.read_stata("stata.dta", iterator=True) as reader:
5487-
chunk1 = reader.read(5)
5488-
chunk2 = reader.read(5)
5484+
reader = pd.read_stata("stata.dta", iterator=True)
5485+
chunk1 = reader.read(5)
5486+
chunk2 = reader.read(5)
54895487
54905488
Currently the ``index`` is retrieved as a column.
54915489

@@ -5597,9 +5595,9 @@ Obtain an iterator and read an XPORT file 100,000 lines at a time:
55975595
pass
55985596
55995597
5600-
with pd.read_sas("sas_xport.xpt", chunk=100000) as rdr:
5601-
for chunk in rdr:
5602-
do_something(chunk)
5598+
rdr = pd.read_sas("sas_xport.xpt", chunk=100000)
5599+
for chunk in rdr:
5600+
do_something(chunk)
56035601
56045602
The specification_ for the xport file format is available from the SAS
56055603
web site.

doc/source/whatsnew/v1.1.5.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,10 @@ Fixed regressions
1919
- Fixed regression in :meth:`DataFrame.loc` and :meth:`Series.loc` for ``__setitem__`` when one-dimensional tuple was given to select from :class:`MultiIndex` (:issue:`37711`)
2020
- Fixed regression in inplace operations on :class:`Series` with ``ExtensionDtype`` with NumPy dtyped operand (:issue:`37910`)
2121
- Fixed regression in metadata propagation for ``groupby`` iterator (:issue:`37343`)
22-
- Fixed regression in :class:`MultiIndex` constructed from a :class:`DatetimeIndex` not retaining frequency (:issue:`35563`)
23-
- Fixed regression in :meth:`DataFrame.unstack` with columns with integer dtype (:issue:`37115`)
2422
- Fixed regression in indexing on a :class:`Series` with ``CategoricalDtype`` after unpickling (:issue:`37631`)
2523
- Fixed regression in :meth:`DataFrame.groupby` aggregation with out-of-bounds datetime objects in an object-dtype column (:issue:`36003`)
2624
- Fixed regression in ``df.groupby(..).rolling(..)`` with the resulting :class:`MultiIndex` when grouping by a label that is in the index (:issue:`37641`)
2725
- Fixed regression in :meth:`DataFrame.fillna` not filling ``NaN`` after other operations such as :meth:`DataFrame.pivot` (:issue:`36495`).
28-
- Fixed performance regression in ``df.groupby(..).rolling(..)`` (:issue:`38038`)
29-
- Fixed regression in :meth:`MultiIndex.intersection` returning duplicates when at least one of the indexes had duplicates (:issue:`36915`)
30-
- Fixed regression in :meth:`.GroupBy.first` and :meth:`.GroupBy.last` where ``None`` was considered a non-NA value (:issue:`38286`)
3126

3227
.. ---------------------------------------------------------------------------
3328

0 commit comments

Comments
 (0)