Skip to content

Commit bcc770b

Browse files
committed
MERGE: resolve master merge conflicts by accepting master
2 parents 6f78520 + 37dfcc1 commit bcc770b

Some content is hidden

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

85 files changed

+598
-450
lines changed

doc/source/user_guide/io.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4683,6 +4683,7 @@ See the documentation for `pyarrow <https://arrow.apache.org/docs/python/>`__ an
46834683
Write to a parquet file.
46844684

46854685
.. ipython:: python
4686+
:okwarning:
46864687
46874688
df.to_parquet('example_pa.parquet', engine='pyarrow')
46884689
df.to_parquet('example_fp.parquet', engine='fastparquet')

doc/source/whatsnew/v1.0.0.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ Other enhancements
204204
- Roundtripping DataFrames with nullable integer or string data types to parquet
205205
(:meth:`~DataFrame.to_parquet` / :func:`read_parquet`) using the `'pyarrow'` engine
206206
now preserve those data types with pyarrow >= 1.0.0 (:issue:`20612`).
207+
- The ``partition_cols`` argument in :meth:`DataFrame.to_parquet` now accepts a string (:issue:`27117`)
207208

208209
Build Changes
209210
^^^^^^^^^^^^^
@@ -432,6 +433,8 @@ Optional libraries below the lowest tested version may still work, but are not c
432433
+-----------------+-----------------+---------+
433434
| pytables | 3.4.2 | |
434435
+-----------------+-----------------+---------+
436+
| s3fs | 0.3.0 | X |
437+
+-----------------+-----------------+---------+
435438
| scipy | 0.19.0 | |
436439
+-----------------+-----------------+---------+
437440
| sqlalchemy | 1.1.4 | |
@@ -453,7 +456,7 @@ See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for mor
453456
Other API changes
454457
^^^^^^^^^^^^^^^^^
455458

456-
- Bumpded the minimum supported version of ``s3fs`` from 0.0.8 to 0.3.0 (:issue:`28616`)
459+
- Bumped the minimum supported version of ``s3fs`` from 0.0.8 to 0.3.0 (:issue:`28616`)
457460
- :class:`pandas.core.groupby.GroupBy.transform` now raises on invalid operation names (:issue:`27489`)
458461
- :meth:`pandas.api.types.infer_dtype` will now return "integer-na" for integer and ``np.nan`` mix (:issue:`27283`)
459462
- :meth:`MultiIndex.from_arrays` will no longer infer names from arrays if ``names=None`` is explicitly provided (:issue:`27292`)
@@ -491,6 +494,7 @@ Deprecations
491494
- :meth:`Categorical.take_nd` is deprecated, use :meth:`Categorical.take` instead (:issue:`27745`)
492495
- The parameter ``numeric_only`` of :meth:`Categorical.min` and :meth:`Categorical.max` is deprecated and replaced with ``skipna`` (:issue:`25303`)
493496
- The parameter ``label`` in :func:`lreshape` has been deprecated and will be removed in a future version (:issue:`29742`)
497+
- ``pandas.core.index`` has been deprecated and will be removed in a future version, the public classes are available in the top-level namespace (:issue:`19711`)
494498
-
495499

496500
.. _whatsnew_1000.prior_deprecations:
@@ -697,6 +701,7 @@ Datetimelike
697701
- Bug in :meth:`DatetimeIndex.strftime` and :meth:`Series.dt.strftime` where ``NaT`` was converted to the string ``'NaT'`` instead of ``np.nan`` (:issue:`29578`)
698702
- Bug in :attr:`Timestamp.resolution` being a property instead of a class attribute (:issue:`29910`)
699703
- Bug in :func:`pandas.to_datetime` when called with ``None`` raising ``TypeError`` instead of returning ``NaT`` (:issue:`30011`)
704+
- Bug in :func:`pandas.to_datetime` failing for `deques` when using ``cache=True`` (the default) (:issue:`29403`)
700705
- Bug in :func:`pandas.to_datetime` when called with ``Series`` storing ``IntegerArray`` raising ``TypeError`` instead of returning ``Series`` (:issue:`30050`)
701706

702707
Timedelta
@@ -872,7 +877,8 @@ Other
872877
- Bug in :meth:`DataFrame.append` that raised ``IndexError`` when appending with empty list (:issue:`28769`)
873878
- Fix :class:`AbstractHolidayCalendar` to return correct results for
874879
years after 2030 (now goes up to 2200) (:issue:`27790`)
875-
- Fixed :class:`IntegerArray` returning ``NA`` rather than ``inf`` for operations dividing by 0 (:issue:`27398`)
880+
- Fixed :class:`IntegerArray` returning ``inf`` rather than ``NaN`` for operations dividing by 0 (:issue:`27398`)
881+
- Fixed ``pow`` operations for :class:`IntegerArray` when the other value is ``0`` or ``1`` (:issue:`29997`)
876882
- Bug in :meth:`Series.count` raises if use_inf_as_na is enabled (:issue:`29478`)
877883

878884

pandas/_libs/internals.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ cdef class BlockPlacement:
9696
return self._as_array
9797

9898
def isin(self, arr):
99-
from pandas.core.index import Int64Index
99+
from pandas.core.indexes.api import Int64Index
100100
return Int64Index(self.as_array, copy=False).isin(arr)
101101

102102
@property

pandas/_libs/lib.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def astype_str(arr: ndarray, skipna: bool=False) -> ndarray[object]:
598598
@cython.boundscheck(False)
599599
def clean_index_list(obj: list):
600600
"""
601-
Utility used in ``pandas.core.index.ensure_index``.
601+
Utility used in ``pandas.core.indexes.api.ensure_index``.
602602
"""
603603
cdef:
604604
Py_ssize_t i, n = len(obj)

pandas/_libs/skiplist.pxd

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

pandas/_libs/window/aggregations.pyx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,27 @@ from pandas._libs.algos import is_monotonic
2222

2323
from pandas._libs.util cimport numeric
2424

25-
from pandas._libs.skiplist cimport (
26-
skiplist_t, skiplist_init, skiplist_destroy, skiplist_get, skiplist_insert,
27-
skiplist_remove)
25+
cdef extern from "../src/skiplist.h":
26+
ctypedef struct node_t:
27+
node_t **next
28+
int *width
29+
double value
30+
int is_nil
31+
int levels
32+
int ref_count
33+
34+
ctypedef struct skiplist_t:
35+
node_t *head
36+
node_t **tmp_chain
37+
int *tmp_steps
38+
int size
39+
int maxlevels
40+
41+
skiplist_t* skiplist_init(int) nogil
42+
void skiplist_destroy(skiplist_t*) nogil
43+
double skiplist_get(skiplist_t*, int, int*) nogil
44+
int skiplist_insert(skiplist_t*, double) nogil
45+
int skiplist_remove(skiplist_t*, double) nogil
2846

2947
cdef:
3048
float32_t MINfloat32 = np.NINF

pandas/core/api.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import numpy as np
44

5+
from pandas._libs import NaT, Period, Timedelta, Timestamp
6+
from pandas._libs.missing import NA
7+
58
from pandas.core.dtypes.dtypes import (
69
CategoricalDtype,
710
DatetimeTZDtype,
@@ -26,24 +29,23 @@
2629
from pandas.core.arrays.string_ import StringDtype
2730
from pandas.core.construction import array
2831
from pandas.core.groupby import Grouper, NamedAgg
29-
from pandas.core.index import (
32+
from pandas.core.indexes.api import (
3033
CategoricalIndex,
3134
DatetimeIndex,
3235
Float64Index,
3336
Index,
3437
Int64Index,
3538
IntervalIndex,
3639
MultiIndex,
37-
NaT,
3840
PeriodIndex,
3941
RangeIndex,
4042
TimedeltaIndex,
4143
UInt64Index,
4244
)
43-
from pandas.core.indexes.datetimes import Timestamp, bdate_range, date_range
45+
from pandas.core.indexes.datetimes import bdate_range, date_range
4446
from pandas.core.indexes.interval import Interval, interval_range
45-
from pandas.core.indexes.period import Period, period_range
46-
from pandas.core.indexes.timedeltas import Timedelta, timedelta_range
47+
from pandas.core.indexes.period import period_range
48+
from pandas.core.indexes.timedeltas import timedelta_range
4749
from pandas.core.indexing import IndexSlice
4850
from pandas.core.series import Series
4951
from pandas.core.tools.datetimes import to_datetime
@@ -55,5 +57,3 @@
5557

5658
# DataFrame needs to be imported after NamedAgg to avoid a circular import
5759
from pandas.core.frame import DataFrame # isort:skip
58-
59-
from pandas._libs.missing import NA

pandas/core/apply.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ def apply_series_generator(self) -> Tuple[ResType, "Index"]:
320320
series_gen = self.series_generator
321321
res_index = self.result_index
322322

323-
i = None
324323
keys = []
325324
results = {}
326325
if self.ignore_failures:

pandas/core/arrays/_ranges.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ def _generate_range_overflow_safe_signed(
179179
# watch out for very special case in which we just slightly
180180
# exceed implementation bounds, but when passing the result to
181181
# np.arange will get a result slightly within the bounds
182-
assert endpoint >= 0
183182
result = np.uint64(endpoint) + np.uint64(addend)
184183
i64max = np.uint64(np.iinfo(np.int64).max)
185184
assert result > i64max

pandas/core/arrays/datetimes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,6 @@ def _validate_dt64_dtype(dtype):
21092109
dtype = pandas_dtype(dtype)
21102110
if is_dtype_equal(dtype, np.dtype("M8")):
21112111
# no precision, disallowed GH#24806
2112-
dtype = _NS_DTYPE
21132112
msg = (
21142113
"Passing in 'datetime64' dtype with no precision is not allowed. "
21152114
"Please pass in 'datetime64[ns]' instead."

0 commit comments

Comments
 (0)