Skip to content

Commit dce777b

Browse files
author
jnecus
committed
Revert "Merge remote-tracking branch 'upstream/master'"
This reverts commit 0d68e31, reversing changes made to 14e2c79.
1 parent 0d68e31 commit dce777b

Some content is hidden

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

77 files changed

+2609
-2954
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ matrix:
7575

7676
before_install:
7777
- echo "before_install"
78-
# Use blocking IO on travis. Ref: https://github.com/travis-ci/travis-ci/issues/8920#issuecomment-352661024
78+
# set non-blocking IO on travis
79+
# https://github.com/travis-ci/travis-ci/issues/8920#issuecomment-352661024
7980
- python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
8081
- source ci/travis_process_gbq_encryption.sh
8182
- export PATH="$HOME/miniconda3/bin:$PATH"

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
[![Downloads](https://anaconda.org/conda-forge/pandas/badges/downloads.svg)](https://pandas.pydata.org)
1717
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pydata/pandas)
1818
[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org)
19-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
2019

2120
## What is it?
2221

doc/source/ecosystem.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ substantial projects that you feel should be on this list, please let us know.
3030
Data cleaning and validation
3131
----------------------------
3232

33-
`Pyjanitor <https://github.com/ericmjl/pyjanitor/>`__
33+
`pyjanitor <https://github.com/ericmjl/pyjanitor/>`__
3434
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3535

3636
Pyjanitor provides a clean API for cleaning data, using method chaining.
@@ -115,7 +115,7 @@ It is very similar to the matplotlib plotting backend, but provides interactive
115115
web-based charts and maps.
116116

117117

118-
`Seaborn <https://seaborn.pydata.org>`__
118+
`seaborn <https://seaborn.pydata.org>`__
119119
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120120

121121
Seaborn is a Python visualization library based on
@@ -136,7 +136,7 @@ provides a powerful, declarative and extremely general way to generate bespoke p
136136
Various implementations to other languages are available.
137137
A good implementation for Python users is `has2k1/plotnine <https://github.com/has2k1/plotnine/>`__.
138138

139-
`IPython vega <https://github.com/vega/ipyvega>`__
139+
`IPython Vega <https://github.com/vega/ipyvega>`__
140140
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141141

142142
`IPython Vega <https://github.com/vega/ipyvega>`__ leverages `Vega
@@ -147,7 +147,7 @@ A good implementation for Python users is `has2k1/plotnine <https://github.com/h
147147

148148
`Plotly’s <https://plot.ly/>`__ `Python API <https://plot.ly/python/>`__ enables interactive figures and web shareability. Maps, 2D, 3D, and live-streaming graphs are rendered with WebGL and `D3.js <https://d3js.org/>`__. The library supports plotting directly from a pandas DataFrame and cloud-based collaboration. Users of `matplotlib, ggplot for Python, and Seaborn <https://plot.ly/python/matplotlib-to-plotly-tutorial/>`__ can convert figures into interactive web-based plots. Plots can be drawn in `IPython Notebooks <https://plot.ly/ipython-notebooks/>`__ , edited with R or MATLAB, modified in a GUI, or embedded in apps and dashboards. Plotly is free for unlimited sharing, and has `cloud <https://plot.ly/product/plans/>`__, `offline <https://plot.ly/python/offline/>`__, or `on-premise <https://plot.ly/product/enterprise/>`__ accounts for private use.
149149

150-
`Qtpandas <https://github.com/draperjames/qtpandas>`__
150+
`QtPandas <https://github.com/draperjames/qtpandas>`__
151151
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152152

153153
Spun off from the main pandas library, the `qtpandas <https://github.com/draperjames/qtpandas>`__
@@ -187,7 +187,7 @@ See :ref:`Options and Settings <options>` and
187187
:ref:`Available Options <options.available>`
188188
for pandas ``display.`` settings.
189189

190-
`Quantopian/qgrid <https://github.com/quantopian/qgrid>`__
190+
`quantopian/qgrid <https://github.com/quantopian/qgrid>`__
191191
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
192192

193193
qgrid is "an interactive grid for sorting and filtering
@@ -249,12 +249,12 @@ The following data feeds are available:
249249
* Stooq Index Data
250250
* MOEX Data
251251

252-
`Quandl/Python <https://github.com/quandl/Python>`__
252+
`quandl/Python <https://github.com/quandl/Python>`__
253253
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
254254
Quandl API for Python wraps the Quandl REST API to return
255255
Pandas DataFrames with timeseries indexes.
256256

257-
`Pydatastream <https://github.com/vfilimonov/pydatastream>`__
257+
`pydatastream <https://github.com/vfilimonov/pydatastream>`__
258258
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
259259
PyDatastream is a Python interface to the
260260
`Refinitiv Datastream (DWS) <https://www.refinitiv.com/en/products/datastream-macroeconomic-analysis>`__
@@ -384,7 +384,7 @@ Pandas provides an interface for defining
384384
system. The following libraries implement that interface to provide types not
385385
found in NumPy or pandas, which work well with pandas' data containers.
386386

387-
`Cyberpandas`_
387+
`cyberpandas`_
388388
~~~~~~~~~~~~~~
389389

390390
Cyberpandas provides an extension type for storing arrays of IP Addresses. These
@@ -411,4 +411,4 @@ Library Accessor Classes Description
411411
.. _pdvega: https://altair-viz.github.io/pdvega/
412412
.. _Altair: https://altair-viz.github.io/
413413
.. _pandas_path: https://github.com/drivendataorg/pandas-path/
414-
.. _pathlib.Path: https://docs.python.org/3/library/pathlib.html
414+
.. _pathlib.Path: https://docs.python.org/3/library/pathlib.html

doc/source/reference/offset_frequency.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,6 @@ Properties
10441044
Tick.nanos
10451045
Tick.normalize
10461046
Tick.rule_code
1047-
Tick.n
10481047

10491048
Methods
10501049
~~~~~~~
@@ -1078,7 +1077,6 @@ Properties
10781077
Day.nanos
10791078
Day.normalize
10801079
Day.rule_code
1081-
Day.n
10821080

10831081
Methods
10841082
~~~~~~~
@@ -1112,7 +1110,6 @@ Properties
11121110
Hour.nanos
11131111
Hour.normalize
11141112
Hour.rule_code
1115-
Hour.n
11161113

11171114
Methods
11181115
~~~~~~~
@@ -1146,7 +1143,6 @@ Properties
11461143
Minute.nanos
11471144
Minute.normalize
11481145
Minute.rule_code
1149-
Minute.n
11501146

11511147
Methods
11521148
~~~~~~~
@@ -1180,7 +1176,6 @@ Properties
11801176
Second.nanos
11811177
Second.normalize
11821178
Second.rule_code
1183-
Second.n
11841179

11851180
Methods
11861181
~~~~~~~
@@ -1214,7 +1209,6 @@ Properties
12141209
Milli.nanos
12151210
Milli.normalize
12161211
Milli.rule_code
1217-
Milli.n
12181212

12191213
Methods
12201214
~~~~~~~
@@ -1248,7 +1242,6 @@ Properties
12481242
Micro.nanos
12491243
Micro.normalize
12501244
Micro.rule_code
1251-
Micro.n
12521245

12531246
Methods
12541247
~~~~~~~
@@ -1282,7 +1275,6 @@ Properties
12821275
Nano.nanos
12831276
Nano.normalize
12841277
Nano.rule_code
1285-
Nano.n
12861278

12871279
Methods
12881280
~~~~~~~

doc/source/user_guide/computation.rst

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -648,24 +648,6 @@ from present information back to past information. This allows the rolling windo
648648
Currently, this feature is only implemented for time-based windows.
649649
For fixed windows, the closed parameter cannot be set and the rolling window will always have both endpoints closed.
650650

651-
.. _stats.iter_rolling_window:
652-
653-
Iteration over window:
654-
~~~~~~~~~~~~~~~~~~~~~~
655-
656-
.. versionadded:: 1.1.0
657-
658-
``Rolling`` and ``Expanding`` objects now support iteration. Be noted that ``min_periods`` is ignored in iteration.
659-
660-
.. ipython::
661-
662-
In [1]: df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})
663-
664-
In [2]: for i in df.rolling(2):
665-
...: print(i)
666-
...:
667-
668-
669651
.. _stats.moments.ts-versus-resampling:
670652

671653
Time-aware rolling vs. resampling

doc/source/whatsnew/v1.1.0.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ Other enhancements
235235
:class:`~pandas.io.stata.StataWriter`, :class:`~pandas.io.stata.StataWriter117`,
236236
and :class:`~pandas.io.stata.StataWriterUTF8` (:issue:`26599`).
237237
- :meth:`HDFStore.put` now accepts `track_times` parameter. Parameter is passed to ``create_table`` method of ``PyTables`` (:issue:`32682`).
238-
- Make :class:`pandas.core.window.Rolling` and :class:`pandas.core.window.Expanding` iterable(:issue:`11704`)
239238

240239
.. ---------------------------------------------------------------------------
241240
@@ -586,7 +585,6 @@ Deprecations
586585

587586
- :func:`pandas.api.types.is_categorical` is deprecated and will be removed in a future version; use `:func:pandas.api.types.is_categorical_dtype` instead (:issue:`33385`)
588587
- :meth:`Index.get_value` is deprecated and will be removed in a future version (:issue:`19728`)
589-
- :meth:`DateOffset.__call__` is deprecated and will be removed in a future version, use ``offset + other`` instead (:issue:`34171`)
590588

591589
.. ---------------------------------------------------------------------------
592590
@@ -607,8 +605,6 @@ Performance improvements
607605
sparse values from ``scipy.sparse`` matrices using the
608606
:meth:`DataFrame.sparse.from_spmatrix` constructor (:issue:`32821`,
609607
:issue:`32825`, :issue:`32826`, :issue:`32856`, :issue:`32858`).
610-
- Performance improvement for groupby methods :meth:`~pandas.core.groupby.groupby.Groupby.first`
611-
and :meth:`~pandas.core.groupby.groupby.Groupby.last` (:issue:`34178`)
612608
- Performance improvement in :func:`factorize` for nullable (integer and boolean) dtypes (:issue:`33064`).
613609
- Performance improvement in reductions (sum, prod, min, max) for nullable (integer and boolean) dtypes (:issue:`30982`, :issue:`33261`, :issue:`33442`).
614610

@@ -817,8 +813,6 @@ Groupby/resample/rolling
817813
- Bug in :meth:`GroupBy.first` and :meth:`GroupBy.last` where None is not preserved in object dtype (:issue:`32800`)
818814
- Bug in :meth:`Rolling.min` and :meth:`Rolling.max`: Growing memory usage after multiple calls when using a fixed window (:issue:`30726`)
819815
- Bug in :meth:`GroupBy.agg`, :meth:`GroupBy.transform`, and :meth:`GroupBy.resample` where subclasses are not preserved (:issue:`28330`)
820-
- Bug in :meth:`GroupBy.rolling.apply` ignores args and kwargs parameters (:issue:`33433`)
821-
822816

823817
Reshaping
824818
^^^^^^^^^

pandas/_libs/groupby.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ cimport numpy as cnp
99
from numpy cimport (ndarray,
1010
int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t,
1111
uint32_t, uint64_t, float32_t, float64_t, complex64_t, complex128_t)
12-
from numpy.math cimport NAN
1312
cnp.import_array()
1413

14+
cdef extern from "numpy/npy_math.h":
15+
float64_t NAN "NPY_NAN"
16+
1517
from pandas._libs.util cimport numeric, get_nat
1618

1719
from pandas._libs.algos cimport (swap, TiebreakEnumType, TIEBREAK_AVERAGE,

pandas/_libs/hashtable.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ from libc.stdlib cimport malloc, free
88
import numpy as np
99
cimport numpy as cnp
1010
from numpy cimport ndarray, uint8_t, uint32_t, float64_t
11-
from numpy.math cimport NAN
1211
cnp.import_array()
1312

13+
cdef extern from "numpy/npy_math.h":
14+
float64_t NAN "NPY_NAN"
1415

1516
from pandas._libs.khash cimport (
1617
khiter_t,
@@ -53,7 +54,7 @@ from pandas._libs.khash cimport (
5354
)
5455

5556

56-
from pandas._libs cimport util
57+
cimport pandas._libs.util as util
5758

5859
from pandas._libs.missing cimport checknull
5960

pandas/_libs/index.pyx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ from numpy cimport (
1919
cnp.import_array()
2020

2121

22-
from pandas._libs cimport util
22+
cimport pandas._libs.util as util
2323

24+
from pandas._libs.tslibs import Period, Timedelta
2425
from pandas._libs.tslibs.nattype cimport c_NaT as NaT
25-
from pandas._libs.tslibs.base cimport ABCTimestamp, ABCTimedelta, ABCPeriod
26+
from pandas._libs.tslibs.base cimport ABCTimestamp
2627

2728
from pandas._libs.hashtable cimport HashTable
2829

@@ -469,7 +470,7 @@ cdef class TimedeltaEngine(DatetimeEngine):
469470
return 'm8[ns]'
470471

471472
cdef int64_t _unbox_scalar(self, scalar) except? -1:
472-
if not (isinstance(scalar, ABCTimedelta) or scalar is NaT):
473+
if not (isinstance(scalar, Timedelta) or scalar is NaT):
473474
raise TypeError(scalar)
474475
return scalar.value
475476

@@ -479,7 +480,7 @@ cdef class PeriodEngine(Int64Engine):
479480
cdef int64_t _unbox_scalar(self, scalar) except? -1:
480481
if scalar is NaT:
481482
return scalar.value
482-
if isinstance(scalar, ABCPeriod):
483+
if isinstance(scalar, Period):
483484
# NB: we assume that we have the correct freq here.
484485
return scalar.ordinal
485486
raise TypeError(scalar)

pandas/_libs/internals.pyx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from collections import defaultdict
2-
31
import cython
2+
from collections import defaultdict
43
from cython import Py_ssize_t
54

65
from cpython.slice cimport PySlice_GetIndicesEx

0 commit comments

Comments
 (0)