Skip to content

Commit 099ed61

Browse files
authored
Merge branch 'master' into issue-pandas-dev#34529
2 parents cf649d0 + 72aed3e commit 099ed61

File tree

234 files changed

+3694
-3584
lines changed

Some content is hidden

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

234 files changed

+3694
-3584
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
rev: 19.10b0
44
hooks:
55
- id: black
6-
language_version: python3.7
6+
language_version: python3
77
- repo: https://gitlab.com/pycqa/flake8
88
rev: 3.7.7
99
hooks:

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
## What is it?
2222

23-
**pandas** is a Python package providing fast, flexible, and expressive data
23+
**pandas** is a Python package that provides fast, flexible, and expressive data
2424
structures designed to make working with "relational" or "labeled" data both
2525
easy and intuitive. It aims to be the fundamental high-level building block for
2626
doing practical, **real world** data analysis in Python. Additionally, it has
@@ -154,11 +154,11 @@ 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 discussion is taking 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

161-
All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.
161+
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.
162162

163163
A detailed overview on how to contribute can be found in the **[contributing guide](https://pandas.pydata.org/docs/dev/development/contributing.html)**. There is also an [overview](.github/CONTRIBUTING.md) on GitHub.
164164

asv_bench/benchmarks/pandas_vb_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
np.uint8,
3434
]
3535
datetime_dtypes = [np.datetime64, np.timedelta64]
36-
string_dtypes = [np.object]
36+
string_dtypes = [object]
3737
try:
3838
extension_dtypes = [
3939
pd.Int8Dtype,

asv_bench/benchmarks/series_methods.py

+8-10
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,15 @@ def time_isin_nan_values(self):
5858

5959
class IsInForObjects:
6060
def setup(self):
61-
self.s_nans = Series(np.full(10 ** 4, np.nan)).astype(np.object)
62-
self.vals_nans = np.full(10 ** 4, np.nan).astype(np.object)
63-
self.s_short = Series(np.arange(2)).astype(np.object)
64-
self.s_long = Series(np.arange(10 ** 5)).astype(np.object)
65-
self.vals_short = np.arange(2).astype(np.object)
66-
self.vals_long = np.arange(10 ** 5).astype(np.object)
61+
self.s_nans = Series(np.full(10 ** 4, np.nan)).astype(object)
62+
self.vals_nans = np.full(10 ** 4, np.nan).astype(object)
63+
self.s_short = Series(np.arange(2)).astype(object)
64+
self.s_long = Series(np.arange(10 ** 5)).astype(object)
65+
self.vals_short = np.arange(2).astype(object)
66+
self.vals_long = np.arange(10 ** 5).astype(object)
6767
# because of nans floats are special:
68-
self.s_long_floats = Series(np.arange(10 ** 5, dtype=np.float)).astype(
69-
np.object
70-
)
71-
self.vals_long_floats = np.arange(10 ** 5, dtype=np.float).astype(np.object)
68+
self.s_long_floats = Series(np.arange(10 ** 5, dtype=np.float)).astype(object)
69+
self.vals_long_floats = np.arange(10 ** 5, dtype=np.float).astype(object)
7270

7371
def time_isin_nans(self):
7472
# if nan-objects are different objects,

asv_bench/benchmarks/sparse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def time_series_to_frame(self):
3232

3333
class SparseArrayConstructor:
3434

35-
params = ([0.1, 0.01], [0, np.nan], [np.int64, np.float64, np.object])
35+
params = ([0.1, 0.01], [0, np.nan], [np.int64, np.float64, object])
3636
param_names = ["dense_proportion", "fill_value", "dtype"]
3737

3838
def setup(self, dense_proportion, fill_value, dtype):

ci/azure/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
CONDA_PY: "36"
1414
PATTERN: "not slow and not network"
1515

16-
py37_np141:
16+
py37_np18:
1717
ENV_FILE: ci/deps/azure-windows-37.yaml
1818
CONDA_PY: "37"
1919
PATTERN: "not slow and not network"

ci/deps/azure-windows-37.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- matplotlib=2.2.*
2323
- moto
2424
- numexpr
25-
- numpy=1.14.*
25+
- numpy=1.18.*
2626
- openpyxl
2727
- pyarrow=0.14
2828
- pytables

doc/source/development/contributing.rst

+31-3
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ want to clone your fork to your machine::
136136
This creates the directory `pandas-yourname` and connects your repository to
137137
the upstream (main project) *pandas* repository.
138138

139+
Note that performing a shallow clone (with ``--depth==N``, for some ``N`` greater
140+
or equal to 1) might break some tests and features as ``pd.show_versions()``
141+
as the version number cannot be computed anymore.
142+
139143
.. _contributing.dev_env:
140144

141145
Creating a development environment
@@ -270,7 +274,7 @@ Creating a Python environment (pip)
270274
If you aren't using conda for your development environment, follow these instructions.
271275
You'll need to have at least Python 3.6.1 installed on your system.
272276

273-
**Unix**/**Mac OS**
277+
**Unix**/**Mac OS with virtualenv**
274278

275279
.. code-block:: bash
276280
@@ -286,7 +290,31 @@ You'll need to have at least Python 3.6.1 installed on your system.
286290
python -m pip install -r requirements-dev.txt
287291
288292
# Build and install pandas
289-
python setup.py build_ext --inplace -j 0
293+
python setup.py build_ext --inplace -j 4
294+
python -m pip install -e . --no-build-isolation --no-use-pep517
295+
296+
**Unix**/**Mac OS with pyenv**
297+
298+
Consult the docs for setting up pyenv `here <https://github.com/pyenv/pyenv>`__.
299+
300+
.. code-block:: bash
301+
302+
# Create a virtual environment
303+
# Use an ENV_DIR of your choice. We'll use ~/Users/<yourname>/.pyenv/versions/pandas-dev
304+
305+
pyenv virtualenv <version> <name-to-give-it>
306+
307+
# For instance:
308+
pyenv virtualenv 3.7.6 pandas-dev
309+
310+
# Activate the virtualenv
311+
pyenv activate pandas-dev
312+
313+
# Now install the build dependencies in the cloned pandas repo
314+
python -m pip install -r requirements-dev.txt
315+
316+
# Build and install pandas
317+
python setup.py build_ext --inplace -j 4
290318
python -m pip install -e . --no-build-isolation --no-use-pep517
291319
292320
**Windows**
@@ -312,7 +340,7 @@ should already exist.
312340
python -m pip install -r requirements-dev.txt
313341
314342
# Build and install pandas
315-
python setup.py build_ext --inplace -j 0
343+
python setup.py build_ext --inplace -j 4
316344
python -m pip install -e . --no-build-isolation --no-use-pep517
317345
318346
Creating a branch

doc/source/ecosystem.rst

+14
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,20 @@ provide a pandas-like and pandas-compatible toolkit for analytics on multi-
320320
dimensional arrays, rather than the tabular data for which pandas excels.
321321

322322

323+
.. _ecosystem.io:
324+
325+
IO
326+
--
327+
328+
`BCPandas <https://github.com/yehoshuadimarsky/bcpandas>`__
329+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
330+
331+
BCPandas provides high performance writes from pandas to Microsoft SQL Server,
332+
far exceeding the performance of the native ``df.to_sql`` method. Internally, it uses
333+
Microsoft's BCP utility, but the complexity is fully abstracted away from the end user.
334+
Rigorously tested, it is a complete replacement for ``df.to_sql``.
335+
336+
323337
.. _ecosystem.out-of-core:
324338

325339
Out-of-core

doc/source/getting_started/intro_tutorials/01_table_oriented.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ I want to store passenger data of the Titanic. For a number of passengers, I kno
5151
df
5252
5353
To manually store data in a table, create a ``DataFrame``. When using a Python dictionary of lists, the dictionary keys will be used as column headers and
54-
the values in each list as rows of the ``DataFrame``.
54+
the values in each list as columns of the ``DataFrame``.
5555

5656
.. raw:: html
5757

@@ -215,4 +215,4 @@ A more extended explanation to ``DataFrame`` and ``Series`` is provided in the :
215215

216216
.. raw:: html
217217

218-
</div>
218+
</div>

doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ I want the values for the three stations as separate columns next to each other
196196
197197
no2_subset.pivot(columns="location", values="value")
198198
199-
The :meth:`~pandas.pivot_table` function is purely reshaping of the data: a single value
199+
The :meth:`~pandas.pivot` function is purely reshaping of the data: a single value
200200
for each index/column combination is required.
201201

202202
.. raw:: html

doc/source/reference/general_utility_functions.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ Exceptions and warnings
3838
errors.AccessorRegistrationWarning
3939
errors.DtypeWarning
4040
errors.EmptyDataError
41-
errors.OutOfBoundsDatetime
41+
errors.InvalidIndexError
4242
errors.MergeError
4343
errors.NullFrequencyError
4444
errors.NumbaUtilError
45+
errors.OutOfBoundsDatetime
4546
errors.ParserError
4647
errors.ParserWarning
4748
errors.PerformanceWarning

doc/source/reference/groupby.rst

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ application to columns of a specific data type.
116116
DataFrameGroupBy.quantile
117117
DataFrameGroupBy.rank
118118
DataFrameGroupBy.resample
119+
DataFrameGroupBy.sample
119120
DataFrameGroupBy.shift
120121
DataFrameGroupBy.size
121122
DataFrameGroupBy.skew

doc/source/themes/nature_with_gtoc/layout.html

-108
This file was deleted.

0 commit comments

Comments
 (0)