chunk_id large_stringlengths 36 36 | doc_type large_stringclasses 2
values | category large_stringclasses 17
values | document large_stringclasses 50
values | version_raw large_stringclasses 590
values | chunk_index int64 0 262 | text large_stringlengths 11 5.69k | file_path large_stringclasses 882
values |
|---|---|---|---|---|---|---|---|
713f4e97-a450-5ef3-b5ce-274bc8be447d | changelog | pandas | pandas_whatsnew | 0.23.1 | 0 | # What's new in pandas 0.23.1
Source: https://pandas.pydata.org/docs/whatsnew/v0.23.1.html
# What’s new in 0.23.1 (June 12, 2018)[#](#what-s-new-in-0-23-1-june-12-2018 "Link to this heading")
This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes
and bug fixes. We recommend tha... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
e4931def-aff5-5782-97b3-c0f72e2276f0 | changelog | pandas | pandas_whatsnew | 0.23.1 | 1 | We’ve reverted a 0.23.0 change to comparing a [`Series`](../reference/api/pandas.Series.html#pandas.Series "pandas.Series") holding datetimes and a `datetime.date` object ([GH 21152](https://github.com/pandas-dev/pandas/issues/21152)).
In pandas 0.22 and earlier, comparing a Series holding datetimes and `datetime.date`... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
a95f09b6-a698-505e-b951-a5153648e4f5 | changelog | pandas | pandas_whatsnew | 0.23.1 | 2 | # 0.22.0... Silently coerce the datetime.date
>>> import datetime
>>> pd.Series(pd.date_range('2017', periods=2)) == datetime.date(2017, 1, 1)
0 True
1 False
dtype: bool
# 0.23.0... Do not coerce the datetime.date
>>> pd.Series(pd.date_range('2017', periods=2)) == datetime.date(2017, 1, 1)
0 False
1 False... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
0d367cef-66b7-5242-aa6b-852e53d6c314 | changelog | pandas | pandas_whatsnew | 0.23.1 | 3 | * Reverted the ability of [`to_sql()`](../reference/api/pandas.DataFrame.to_sql.html#pandas.DataFrame.to_sql "pandas.DataFrame.to_sql") to perform multivalue
inserts as this caused regression in certain cases ([GH 21103](https://github.com/pandas-dev/pandas/issues/21103)).
In the future this will be made configurab... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
1c0aa610-c99d-5150-b853-402d8c3fa1a7 | changelog | pandas | pandas_whatsnew | 0.23.1 | 4 | returned incorrect date when the input date has a non-UTC timezone ([GH 21230](https://github.com/pandas-dev/pandas/issues/21230)).
* Fixed regression in `pandas.io.json.json_normalize()` when called with `None` values
in nested levels in JSON, and to not drop keys with value as `None` ([GH 21158](https://github.co... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
66b4dd0b-c317-5f8c-8665-d2604417627c | changelog | pandas | pandas_whatsnew | 0.23.1 | 5 | * Bug in `Categorical.fillna()` incorrectly raising a `TypeError` when `value` the individual categories are iterable and `value` is an iterable ([GH 21097](https://github.com/pandas-dev/pandas/issues/21097), [GH 19788](https://github.com/pandas-dev/pandas/issues/19788))
* Fixed regression in constructors coercing NA v... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
0f6db3a2-10fd-50fb-ada1-965155fff435 | changelog | pandas | pandas_whatsnew | 0.23.1 | 6 | ## Performance improvements[#](#performance-improvements "Link to this heading")
* Improved performance of `CategoricalIndex.is_monotonic_increasing()`, `CategoricalIndex.is_monotonic_decreasing()` and `CategoricalIndex.is_monotonic()` ([GH 21025](https://github.com/pandas-dev/pandas/issues/21025))
* Improved performa... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
1852d987-f304-5ef4-bbc6-90628a835e8e | changelog | pandas | pandas_whatsnew | 0.23.1 | 7 | * Bug in `GroupBy.ffill()` and `GroupBy.bfill()` where the fill within a grouping would not always be applied as intended due to the implementations’ use of a non-stable sort ([GH 21207](https://github.com/pandas-dev/pandas/issues/21207))
* Bug in `GroupBy.rank()` where results did not scale to 100% when specifying `me... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
8f2c859b-2e95-5dc5-9d3e-d41563de017e | changelog | pandas | pandas_whatsnew | 0.23.1 | 8 | * Bug in [`Timedelta`](../reference/api/pandas.Timedelta.html#pandas.Timedelta "pandas.Timedelta") where passing a float with a unit would prematurely round the float precision ([GH 14156](https://github.com/pandas-dev/pandas/issues/14156))
* Bug in [`pandas.testing.assert_index_equal()`](../reference/api/pandas.testin... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
e966cb80-c428-5e5f-808c-188014680f01 | changelog | pandas | pandas_whatsnew | 0.23.1 | 9 | * Bug in [`Series.reset_index()`](../reference/api/pandas.Series.reset_index.html#pandas.Series.reset_index "pandas.Series.reset_index") where appropriate error was not raised with an invalid level name ([GH 20925](https://github.com/pandas-dev/pandas/issues/20925))
* Bug in [`interval_range()`](../reference/api/pandas... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
f7d2af18-8d96-5d33-9e35-5284c8b9d830 | changelog | pandas | pandas_whatsnew | 0.23.1 | 10 | * Bug in [`IntervalIndex`](../reference/api/pandas.IntervalIndex.html#pandas.IntervalIndex "pandas.IntervalIndex") constructors where creating an `IntervalIndex` from categorical data was not fully supported ([GH 21243](https://github.com/pandas-dev/pandas/issues/21243), [GH 21253](https://github.com/pandas-dev/pandas/... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
b39a7768-a476-5c84-baaa-b0a261899c2e | changelog | pandas | pandas_whatsnew | 0.23.1 | 11 | * Bug in IO methods specifying `compression='zip'` which produced uncompressed zip archives ([GH 17778](https://github.com/pandas-dev/pandas/issues/17778), [GH 21144](https://github.com/pandas-dev/pandas/issues/21144))
* Bug in [`DataFrame.to_stata()`](../reference/api/pandas.DataFrame.to_stata.html#pandas.DataFrame.to... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
9459a673-705b-5176-a8ac-15fe71d889a5 | changelog | pandas | pandas_whatsnew | 0.23.1 | 12 | * Bug in IO JSON [`read_json()`](../reference/api/pandas.read_json.html#pandas.read_json "pandas.read_json") reading empty JSON schema with `orient='table'` back to [`DataFrame`](../reference/api/pandas.DataFrame.html#pandas.DataFrame "pandas.DataFrame") caused an error ([GH 21287](https://github.com/pandas-dev/pandas/... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
a0a5accb-86db-5c63-8280-f40f2fd871f4 | changelog | pandas | pandas_whatsnew | 0.23.1 | 13 | * Tab completion on [`Index`](../reference/api/pandas.Index.html#pandas.Index "pandas.Index") in IPython no longer outputs deprecation warnings ([GH 21125](https://github.com/pandas-dev/pandas/issues/21125))
* Bug preventing pandas being used on Windows without C++ redistributable installed ([GH 21106](https://github.c... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.1.md |
d7e318bb-f84c-50c0-b3ed-69af3068896e | changelog | pandas | pandas_whatsnew | 0.23.2 | 0 | # What's new in pandas 0.23.2
Source: https://pandas.pydata.org/docs/whatsnew/v0.23.2.html
# What’s new in 0.23.2 (July 5, 2018)[#](#what-s-new-in-0-23-2-july-5-2018 "Link to this heading")
This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes
and bug fixes. We recommend that ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
2535d3b1-8a39-5407-b5b6-5f8cc55b960e | changelog | pandas | pandas_whatsnew | 0.23.2 | 1 | ## Logical reductions over entire DataFrame[#](#logical-reductions-over-entire-dataframe "Link to this heading")
[`DataFrame.all()`](../reference/api/pandas.DataFrame.all.html#pandas.DataFrame.all "pandas.DataFrame.all") and [`DataFrame.any()`](../reference/api/pandas.DataFrame.any.html#pandas.DataFrame.any "pandas.Da... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
ac6bbcc8-bc00-5f81-b4b5-074f840c5151 | changelog | pandas | pandas_whatsnew | 0.23.2 | 2 | With pandas 0.23.2, that will correctly return False, as it did with NumPy < 1.15.
```None
In [3]: np.any(pd.DataFrame({"A": [False], "B": [False]}))
Out[3]: False
```
## Fixed regressions[#](#fixed-regressions "Link to this heading")
* Fixed regression in `to_csv()` when handling file-like object incorrectly ([GH 2... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
825c7ee9-4977-5ea0-832c-0631e47f2ff3 | changelog | pandas | pandas_whatsnew | 0.23.2 | 3 | * Fixed printing of DataFrames with hierarchical columns with long names ([GH 21180](https://github.com/pandas-dev/pandas/issues/21180))
* Fixed regression in [`reindex()`](../reference/api/pandas.DataFrame.reindex.html#pandas.DataFrame.reindex "pandas.DataFrame.reindex") and [`groupby()`](../reference/api/pandas.DataF... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
e8bc6ac1-111f-5606-b0ad-f1049bc2997d | changelog | pandas | pandas_whatsnew | 0.23.2 | 4 | * Bug in [`Timestamp.ceil()`](../reference/api/pandas.Timestamp.ceil.html#pandas.Timestamp.ceil "pandas.Timestamp.ceil") and [`Timestamp.floor()`](../reference/api/pandas.Timestamp.floor.html#pandas.Timestamp.floor "pandas.Timestamp.floor") when timestamp is a multiple of the rounding frequency ([GH 21262](https://gith... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
7f53f558-9e00-5f55-9301-f7ca74f0db6a | changelog | pandas | pandas_whatsnew | 0.23.2 | 5 | ## Bug fixes[#](#bug-fixes "Link to this heading")
**Conversion**
* Bug in constructing [`Index`](../reference/api/pandas.Index.html#pandas.Index "pandas.Index") with an iterator or generator ([GH 21470](https://github.com/pandas-dev/pandas/issues/21470))
* Bug in [`Series.nlargest()`](../reference/api/pandas.Series.... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
f774461b-63d8-5ea0-9ff7-e7cd07405f34 | changelog | pandas | pandas_whatsnew | 0.23.2 | 6 | * Bug in comparison operations for [`MultiIndex`](../reference/api/pandas.MultiIndex.html#pandas.MultiIndex "pandas.MultiIndex") where error was raised on equality / inequality comparison involving a MultiIndex with `nlevels == 1` ([GH 21149](https://github.com/pandas-dev/pandas/issues/21149))
* Bug in [`DataFrame.drop... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
fc22019f-76ba-5f6c-b944-ff75f49e2062 | changelog | pandas | pandas_whatsnew | 0.23.2 | 7 | * Bug in [`read_csv()`](../reference/api/pandas.read_csv.html#pandas.read_csv "pandas.read_csv") that caused it to incorrectly raise an error when `nrows=0`, `low_memory=True`, and `index_col` was not `None` ([GH 21141](https://github.com/pandas-dev/pandas/issues/21141))
* Bug in [`json_normalize()`](../reference/api/p... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
0c29db43-44b6-5f7b-95be-856fef5efc22 | changelog | pandas | pandas_whatsnew | 0.23.2 | 8 | * Bug in [`Timestamp`](../reference/api/pandas.Timestamp.html#pandas.Timestamp "pandas.Timestamp") and [`DatetimeIndex`](../reference/api/pandas.DatetimeIndex.html#pandas.DatetimeIndex "pandas.DatetimeIndex") where passing a [`Timestamp`](../reference/api/pandas.Timestamp.html#pandas.Timestamp "pandas.Timestamp") local... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
86c0e605-c5b1-54c0-b097-314ce1654a7e | changelog | pandas | pandas_whatsnew | 0.23.2 | 9 | * Bug in [`Timestamp`](../reference/api/pandas.Timestamp.html#pandas.Timestamp "pandas.Timestamp") constructor where passing an invalid timezone offset designator (`Z`) would not raise a `ValueError` ([GH 8910](https://github.com/pandas-dev/pandas/issues/8910))
* Bug in [`Timestamp.replace()`](../reference/api/pandas.T... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
df6f631a-ba42-5774-b001-0cedad757169 | changelog | pandas | pandas_whatsnew | 0.23.2 | 10 | * Bug in [`Timedelta`](../reference/api/pandas.Timedelta.html#pandas.Timedelta "pandas.Timedelta") where non-zero timedeltas shorter than 1 microsecond were considered False ([GH 21484](https://github.com/pandas-dev/pandas/issues/21484))
## Contributors[#](#contributors "Link to this heading")
A total of 17 people co... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.2.md |
a2d56dca-6abe-50d0-b09d-a4d7321aa7d8 | changelog | pandas | pandas_whatsnew | 0.23.3 | 0 | # What's new in pandas 0.23.3
Source: https://pandas.pydata.org/docs/whatsnew/v0.23.3.html
# What’s new in 0.23.3 (July 7, 2018)[#](#what-s-new-in-0-23-3-july-7-2018 "Link to this heading")
This release fixes a build issue with the sdist for Python 3.7 ([GH 21785](https://github.com/pandas-dev/pandas/issues/21785))
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.3.md |
a966ee21-a3cd-52f7-9e92-45162191cbd6 | changelog | pandas | pandas_whatsnew | 0.23.4 | 0 | # What's new in pandas 0.23.4
Source: https://pandas.pydata.org/docs/whatsnew/v0.23.4.html
# What’s new in 0.23.4 (August 3, 2018)[#](#what-s-new-in-0-23-4-august-3-2018 "Link to this heading")
This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes
and bug fixes. We recommend t... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.4.md |
13854461-594b-5c59-8185-737c2f2c2d59 | changelog | pandas | pandas_whatsnew | 0.23.4 | 1 | ## Bug fixes[#](#bug-fixes "Link to this heading")
**Groupby/resample/rolling**
* Bug where calling `DataFrameGroupBy.agg()` with a list of functions including `ohlc` as the non-initial element would raise a `ValueError` ([GH 21716](https://github.com/pandas-dev/pandas/issues/21716))
* Bug in `roll_quantile` caused a... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.4.md |
50cc8858-fcda-5393-98da-096cb431d3e1 | changelog | pandas | pandas_whatsnew | 0.23.4 | 2 | ## Contributors[#](#contributors "Link to this heading")
A total of 6 people contributed patches to this release. People with a
“+” by their names contributed a patch for the first time.
* Jeff Reback
* MeeseeksMachine +
* Tom Augspurger
* chris-b1
* h-vetinari
* meeseeksdev[bot]
| large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.4.md |
e8cd0746-d930-55f3-a5fd-68d32f5f9d7c | changelog | pandas | pandas_whatsnew | 0.24.0 | 0 | # What's new in pandas 0.24.0
Source: https://pandas.pydata.org/docs/whatsnew/v0.24.0.html
# What’s new in 0.24.0 (January 25, 2019)[#](#what-s-new-in-0-24-0-january-25-2019 "Link to this heading")
Warning
The 0.24.x series of releases will be the last to support Python 2. Future feature
releases will support Pytho... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
d9f0b591-3f81-5e12-9eb2-6d2ec83511e6 | changelog | pandas | pandas_whatsnew | 0.24.0 | 1 | * [Support for joining on two MultiIndexes](#whatsnew-0240-enhancements-join-with-two-multiindexes)
Check the [API Changes](#whatsnew-0240-api-breaking) and [deprecations](#whatsnew-0240-deprecations) before updating.
These are the changes in pandas 0.24.0. See [Release notes](index.html#release) for a full changelog... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
acd36b65-0bf4-5772-9d1d-5437ae87c245 | changelog | pandas | pandas_whatsnew | 0.24.0 | 2 | marker of `np.nan` will infer to integer dtype. The display of the `Series` will also use the `NaN` to indicate missing values in string outputs. ([GH 20700](https://github.com/pandas-dev/pandas/issues/20700), [GH 20747](https://github.com/pandas-dev/pandas/issues/20747), [GH 22441](https://github.com/pandas-dev/pandas... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
7275559b-a012-5dfa-9b63-417ab4104887 | changelog | pandas | pandas_whatsnew | 0.24.0 | 3 | In [6]: s + s.iloc[1:3].astype('Int8')
Out[6]:
0 <NA>
1 4
2 <NA>
Length: 3, dtype: Int64
# coerce when needed
In [7]: s + 0.01
Out[7]:
0 1.01
1 2.01
2 <NA>
Length: 3, dtype: Float64
```
These dtypes can operate as part of a `DataFrame`.
```None
In [8]: df = pd.DataFrame({'A': s, 'B': [1, 1, 3]... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
9347ea96-fe42-5455-81b5-22dc0c54bdc7 | changelog | pandas | pandas_whatsnew | 0.24.0 | 4 | B
1 3
3 0
Name: A, Length: 2, dtype: Int64
```
Warning
The Integer NA support currently uses the capitalized dtype version, e.g. `Int8` as compared to the traditional `int8`. This may be changed at a future date.
See [Nullable integer data type](../user_guide/integer_na.html#integer-na) for more.
### Accessin... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
bc59e40f-3bee-5301-ac85-ace0069b104d | changelog | pandas | pandas_whatsnew | 0.24.0 | 5 | ['2000-01-01', '2000-01-02', '2000-01-03', '2000-01-04']
Length: 4, dtype: period[D]
```
Historically, this would have been done with `series.values`, but with
`.values` it was unclear whether the returned value would be the actual array,
some transformation of it, or one of pandas custom arrays (like
`Categorical`). ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
e660647c-dd88-5ca1-82df-c00640139a74 | changelog | pandas | pandas_whatsnew | 0.24.0 | 6 | array([Period('2000-01-01', 'D'), Period('2000-01-02', 'D'),
Period('2000-01-03', 'D'), Period('2000-01-04', 'D')], dtype=object)
In [22]: pd.Series(idx).to_numpy()
Out[22]:
array([Period('2000-01-01', 'D'), Period('2000-01-02', 'D'),
Period('2000-01-03', 'D'), Period('2000-01-04', 'D')], dtype=object)
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
d5655081-cee8-505b-8a10-89a27dcc1245 | changelog | pandas | pandas_whatsnew | 0.24.0 | 7 | ```
We haven’t removed or deprecated [`Series.values`](../reference/api/pandas.Series.values.html#pandas.Series.values "pandas.Series.values") or [`DataFrame.values`](../reference/api/pandas.DataFrame.values.html#pandas.DataFrame.values "pandas.DataFrame.values"), but we
highly recommend and using `.array` or `.to_num... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
b448181f-e651-55fc-9dbd-f2d52f96465a | changelog | pandas | pandas_whatsnew | 0.24.0 | 8 | extension arrays registered by [3rd party libraries](https://pandas.pydata.org/community/ecosystem.html).
See the [dtypes docs](../user_guide/basics.html#basics-dtypes) for more on extension arrays.
```None
In [26]: pd.array([1, 2, np.nan], dtype='Int64')
Out[26]:
<IntegerArray>
[1, 2, <NA>]
Length: 3, dtype: Int64
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
a4543505-a277-5d26-bc10-74547f95e8a4 | changelog | pandas | pandas_whatsnew | 0.24.0 | 9 | [`ExtensionArray`](../reference/api/pandas.api.extensions.ExtensionArray.html#pandas.api.extensions.ExtensionArray "pandas.api.extensions.ExtensionArray"), `PandasArray`
satisfies that need.
Notice that by default, if no `dtype` is specified, the dtype of the returned
array is inferred from the data. In particular, no... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
25e548a3-b703-5655-a7f3-96e4b8cc41ec | changelog | pandas | pandas_whatsnew | 0.24.0 | 10 | [`Interval`](../reference/api/pandas.Interval.html#pandas.Interval "pandas.Interval") and [`Period`](../reference/api/pandas.Period.html#pandas.Period "pandas.Period") data may now be stored in a [`Series`](../reference/api/pandas.Series.html#pandas.Series "pandas.Series") or [`DataFrame`](../reference/api/pandas.DataF... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
78f05e5f-8668-53ec-a3bf-0df065305619 | changelog | pandas | pandas_whatsnew | 0.24.0 | 11 | In [33]: pser = pd.Series(pd.period_range("2000", freq="D", periods=5))
In [34]: pser
Out[34]:
0 2000-01-01
1 2000-01-02
2 2000-01-03
3 2000-01-04
4 2000-01-05
Length: 5, dtype: period[D]
In [35]: pser.dtype
Out[35]: period[D]
```
Previously, these would be cast to a NumPy array with object dtype. In... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
2ad86984-6b77-5468-98c3-7430bbdda45c | changelog | pandas | pandas_whatsnew | 0.24.0 | 12 | ['2000-01-01', '2000-01-02', '2000-01-03', '2000-01-04', '2000-01-05']
Length: 5, dtype: period[D]
```
These return an instance of [`arrays.IntervalArray`](../reference/api/pandas.arrays.IntervalArray.html#pandas.arrays.IntervalArray "pandas.arrays.IntervalArray") or [`arrays.PeriodArray`](../reference/api/pandas.arra... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
a2b620e3-4a91-57ab-b5e2-922bfcf11199 | changelog | pandas | pandas_whatsnew | 0.24.0 | 13 | See [Dtypes](../user_guide/basics.html#basics-dtypes) and [Attributes and Underlying Data](../user_guide/basics.html#basics-attrs)
for more.
### Joining with two multi-indexes[#](#joining-with-two-multi-indexes "Link to this heading")
[`DataFrame.merge()`](../reference/api/pandas.DataFrame.merge.html#pandas.DataFrame... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
5b2575ad-0a4c-5dc1-9ef1-1ced0e500f9c | changelog | pandas | pandas_whatsnew | 0.24.0 | 14 | In [39]: left = pd.DataFrame({'A': ['A0', 'A1', 'A2'],
....: 'B': ['B0', 'B1', 'B2']}, index=index_left)
....:
In [40]: index_right = pd.MultiIndex.from_tuples([('K0', 'Y0'), ('K1', 'Y1'),
....: ('K2', 'Y2'), ('K2', 'Y3')],
....: ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
0e58582d-2828-547f-b979-46015d9af065 | changelog | pandas | pandas_whatsnew | 0.24.0 | 15 | X1 Y0 A1 B1 C0 D0
K1 X2 Y1 A2 B2 C1 D1
[3 rows x 4 columns]
```
### Function `read_html` enhancements[#](#function-read-html-enhancements "Link to this heading")
[`read_html()`](../reference/api/pandas.read_html.html#pandas.read_html "pandas.read_html") previously ignored `colspan` and `rowspan` attribu... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
d08cd9d4-8125-58f1-9665-a6f135020f8b | changelog | pandas | pandas_whatsnew | 0.24.0 | 16 | [ A B C
0 1 1 2
[1 rows x 3 columns]]
```
### New `Styler.pipe()` method[#](#new-styler-pipe-method "Link to this heading")
The [`Styler`](../reference/api/pandas.io.formats.style.Styler.html#pandas.io.formats.style.Styler "pandas.io.formats.style.Styler") class has gained a
[`pipe()`](../reference/api/pan... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
2e43c410-a3b5-554d-b869-fa15fc082973 | changelog | pandas | pandas_whatsnew | 0.24.0 | 17 | In [49]: df.style.pipe(format_and_align).set_caption('Summary of results.')
Out[49]: <pandas.io.formats.style.Styler at 0x7f83e28a8490>
```
Similar methods already exist for other classes in pandas, including [`DataFrame.pipe()`](../reference/api/pandas.DataFrame.pipe.html#pandas.DataFrame.pipe "pandas.DataFrame.pipe"... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
832b9efe-638d-53c5-85c3-fb7994c5d611 | changelog | pandas | pandas_whatsnew | 0.24.0 | 18 | This change allows a dictionary to be passed so that some of the names
of a `MultiIndex` can be changed.
Example:
```None
In [50]: mi = pd.MultiIndex.from_product([list('AB'), list('CD'), list('EF')],
....: names=['AB', 'CD', 'EF'])
....:
In [51]: df = pd.DataFrame(list(range(l... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
1e3b7b61-f9c5-5861-afdd-3154b032b712 | changelog | pandas | pandas_whatsnew | 0.24.0 | 19 | ### Other enhancements[#](#other-enhancements "Link to this heading")
* [`merge()`](../reference/api/pandas.merge.html#pandas.merge "pandas.merge") now directly allows merge between objects of type `DataFrame` and named `Series`, without the need to convert the `Series` object into a `DataFrame` beforehand ([GH 21220]... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
6fcae7dd-f6d1-520e-b8c0-751174f7b9fe | changelog | pandas | pandas_whatsnew | 0.24.0 | 20 | * [`DataFrame.to_parquet()`](../reference/api/pandas.DataFrame.to_parquet.html#pandas.DataFrame.to_parquet "pandas.DataFrame.to_parquet") now accepts `index` as an argument, allowing
the user to override the engine’s default behavior to include or omit the
dataframe’s indexes from the resulting Parquet file. ([GH 2... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
42c458c7-56be-5bd6-b917-397c7c0155a2 | changelog | pandas | pandas_whatsnew | 0.24.0 | 21 | * [`DataFrame.to_string()`](../reference/api/pandas.DataFrame.to_string.html#pandas.DataFrame.to_string "pandas.DataFrame.to_string") now accepts `decimal` as an argument, allowing the user to specify which decimal separator should be used in the output. ([GH 23614](https://github.com/pandas-dev/pandas/issues/23614))
*... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
f1710410-f309-54f3-ab2c-5a867d92fc41 | changelog | pandas | pandas_whatsnew | 0.24.0 | 22 | * [`pandas.read_csv()`](../reference/api/pandas.read_csv.html#pandas.read_csv "pandas.read_csv") now supports pandas extension types as an argument to `dtype`, allowing the user to use pandas extension types when reading CSVs. ([GH 23228](https://github.com/pandas-dev/pandas/issues/23228))
* The [`shift()`](../referenc... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
8b78c348-8858-59b8-9027-1dd251b49619 | changelog | pandas | pandas_whatsnew | 0.24.0 | 23 | * [`Series.mode()`](../reference/api/pandas.Series.mode.html#pandas.Series.mode "pandas.Series.mode") and [`DataFrame.mode()`](../reference/api/pandas.DataFrame.mode.html#pandas.DataFrame.mode "pandas.DataFrame.mode") now support the `dropna` parameter which can be used to specify whether `NaN`/`NaT` values should be c... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
04c4a922-3050-55d7-b70a-f68ddb39fa78 | changelog | pandas | pandas_whatsnew | 0.24.0 | 24 | * [`Index.droplevel()`](../reference/api/pandas.Index.droplevel.html#pandas.Index.droplevel "pandas.Index.droplevel") is now implemented also for flat indexes, for compatibility with [`MultiIndex`](../reference/api/pandas.MultiIndex.html#pandas.MultiIndex "pandas.MultiIndex") ([GH 21115](https://github.com/pandas-dev/p... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
ea5362d2-6ee2-5495-87b4-69dd4c769386 | changelog | pandas | pandas_whatsnew | 0.24.0 | 25 | * [`DataFrame.to_gbq()`](../reference/api/pandas.DataFrame.to_gbq.html#pandas.DataFrame.to_gbq "pandas.DataFrame.to_gbq") and [`read_gbq()`](../reference/api/pandas.read_gbq.html#pandas.read_gbq "pandas.read_gbq") signature and documentation updated to
reflect changes from the [pandas-gbq library version 0.8.0](https... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
64f5d70c-8226-5fb4-8f7c-7c3d04d24d6d | changelog | pandas | pandas_whatsnew | 0.24.0 | 26 | * [`read_html()`](../reference/api/pandas.read_html.html#pandas.read_html "pandas.read_html") copies cell data across `colspan` and `rowspan`, and it treats all-`th` table rows as headers if `header` kwarg is not given and there is no `thead` ([GH 17054](https://github.com/pandas-dev/pandas/issues/17054))
* [`Series.nl... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
c65d0f2c-2c50-5051-b807-bf2ec35050a5 | changelog | pandas | pandas_whatsnew | 0.24.0 | 27 | * [`IntervalIndex`](../reference/api/pandas.IntervalIndex.html#pandas.IntervalIndex "pandas.IntervalIndex") has gained the [`set_closed()`](../reference/api/pandas.IntervalIndex.set_closed.html#pandas.IntervalIndex.set_closed "pandas.IntervalIndex.set_closed") method to change the existing `closed` value ([GH 21670](ht... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
25bc2a6e-71cc-5f35-a088-f648a4a49671 | changelog | pandas | pandas_whatsnew | 0.24.0 | 28 | The default compression for `to_csv`, `to_json`, and `to_pickle` methods has been updated to `'infer'` ([GH 22004](https://github.com/pandas-dev/pandas/issues/22004)).
* [`DataFrame.to_sql()`](../reference/api/pandas.DataFrame.to_sql.html#pandas.DataFrame.to_sql "pandas.DataFrame.to_sql") now supports writing `TIMEST... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
70e04558-ddc7-5042-8989-5c3a8a1c357f | changelog | pandas | pandas_whatsnew | 0.24.0 | 29 | * [`Series`](../reference/api/pandas.Series.html#pandas.Series "pandas.Series") and [`DataFrame`](../reference/api/pandas.DataFrame.html#pandas.DataFrame "pandas.DataFrame") now support `Iterable` objects in the constructor ([GH 2193](https://github.com/pandas-dev/pandas/issues/2193))
* [`DatetimeIndex`](../reference/a... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
5663b7fd-fde1-5994-ac83-61c0542cc540 | changelog | pandas | pandas_whatsnew | 0.24.0 | 30 | * [`round()`](../reference/api/pandas.Timestamp.round.html#pandas.Timestamp.round "pandas.Timestamp.round"), [`ceil()`](../reference/api/pandas.Timestamp.ceil.html#pandas.Timestamp.ceil "pandas.Timestamp.ceil"), and [`floor()`](../reference/api/pandas.Timestamp.floor.html#pandas.Timestamp.floor "pandas.Timestamp.floor"... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
6070f893-0977-51c6-83b7-85320e7d97ca | changelog | pandas | pandas_whatsnew | 0.24.0 | 31 | * The result of [`resample()`](../reference/api/pandas.DataFrame.resample.html#pandas.DataFrame.resample "pandas.DataFrame.resample") is now iterable similar to `groupby()` ([GH 15314](https://github.com/pandas-dev/pandas/issues/15314)).
* [`Series.resample()`](../reference/api/pandas.Series.resample.html#pandas.Series... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
2e189e21-8cf1-5983-becf-1f1a3922f55e | changelog | pandas | pandas_whatsnew | 0.24.0 | 32 | * [`DataFrame.resample()`](../reference/api/pandas.DataFrame.resample.html#pandas.DataFrame.resample "pandas.DataFrame.resample") and [`Series.resample()`](../reference/api/pandas.Series.resample.html#pandas.Series.resample "pandas.Series.resample") with a [`PeriodIndex`](../reference/api/pandas.PeriodIndex.html#pandas... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
d100ac7c-1079-5cdf-837f-804f3b526a58 | changelog | pandas | pandas_whatsnew | 0.24.0 | 33 | * [`Index.to_frame()`](../reference/api/pandas.Index.to_frame.html#pandas.Index.to_frame "pandas.Index.to_frame") now supports overriding column name(s) ([GH 22580](https://github.com/pandas-dev/pandas/issues/22580)).
* [`Categorical.from_codes()`](../reference/api/pandas.Categorical.from_codes.html#pandas.Categorical.... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
90bb0717-538f-5bc4-9415-f23c225ab3d5 | changelog | pandas | pandas_whatsnew | 0.24.0 | 34 | * Added [`Interval.overlaps()`](../reference/api/pandas.Interval.overlaps.html#pandas.Interval.overlaps "pandas.Interval.overlaps"), [`arrays.IntervalArray.overlaps()`](../reference/api/pandas.arrays.IntervalArray.overlaps.html#pandas.arrays.IntervalArray.overlaps "pandas.arrays.IntervalArray.overlaps"), and [`Interval... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
481852b7-8e70-5cd9-a8f5-8805e53f2b35 | changelog | pandas | pandas_whatsnew | 0.24.0 | 35 | * [`to_parquet()`](../reference/api/pandas.DataFrame.to_parquet.html#pandas.DataFrame.to_parquet "pandas.DataFrame.to_parquet") now supports writing a `DataFrame` as a directory of parquet files partitioned by a subset of the columns when `engine = 'pyarrow'` ([GH 23283](https://github.com/pandas-dev/pandas/issues/2328... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
8d31614d-461f-55ff-b77d-a05e3db23c9e | changelog | pandas | pandas_whatsnew | 0.24.0 | 36 | * [`Timestamp.tz_localize()`](../reference/api/pandas.Timestamp.tz_localize.html#pandas.Timestamp.tz_localize "pandas.Timestamp.tz_localize"), [`DatetimeIndex.tz_localize()`](../reference/api/pandas.DatetimeIndex.tz_localize.html#pandas.DatetimeIndex.tz_localize "pandas.DatetimeIndex.tz_localize"), and [`Series.tz_loca... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
12d1767f-d80f-5b5d-86b8-33c698c4698b | changelog | pandas | pandas_whatsnew | 0.24.0 | 37 | * [`Index.difference()`](../reference/api/pandas.Index.difference.html#pandas.Index.difference "pandas.Index.difference"), [`Index.intersection()`](../reference/api/pandas.Index.intersection.html#pandas.Index.intersection "pandas.Index.intersection"), [`Index.union()`](../reference/api/pandas.Index.union.html#pandas.In... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
f89f7f22-078a-5c7a-a76b-3589e98c5200 | changelog | pandas | pandas_whatsnew | 0.24.0 | 38 | * [`MultiIndex.to_flat_index()`](../reference/api/pandas.MultiIndex.to_flat_index.html#pandas.MultiIndex.to_flat_index "pandas.MultiIndex.to_flat_index") has been added to flatten multiple levels into a single-level [`Index`](../reference/api/pandas.Index.html#pandas.Index "pandas.Index") object.
* [`DataFrame.to_stata... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
4fbce404-710a-5445-9527-7d86bbcd5ba3 | changelog | pandas | pandas_whatsnew | 0.24.0 | 39 | * [`DataFrame.to_records()`](../reference/api/pandas.DataFrame.to_records.html#pandas.DataFrame.to_records "pandas.DataFrame.to_records") now accepts `index_dtypes` and `column_dtypes` parameters to allow different data types in stored column and index records ([GH 18146](https://github.com/pandas-dev/pandas/issues/181... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
1c4ac354-f0a0-5d57-87ad-2db9008ff510 | changelog | pandas | pandas_whatsnew | 0.24.0 | 40 | * [`pandas.DataFrame.to_sql()`](../reference/api/pandas.DataFrame.to_sql.html#pandas.DataFrame.to_sql "pandas.DataFrame.to_sql") has gained the `method` argument to control SQL insertion clause. See the [insertion method](../user_guide/io.html#io-sql-method) section in the documentation. ([GH 8953](https://github.com/p... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
58e96cf1-fe02-5bb9-99e0-21c3269b92d1 | changelog | pandas | pandas_whatsnew | 0.24.0 | 41 | * [`DataFrame.to_json()`](../reference/api/pandas.DataFrame.to_json.html#pandas.DataFrame.to_json "pandas.DataFrame.to_json"), [`DataFrame.to_csv()`](../reference/api/pandas.DataFrame.to_csv.html#pandas.DataFrame.to_csv "pandas.DataFrame.to_csv"), [`DataFrame.to_pickle()`](../reference/api/pandas.DataFrame.to_pickle.ht... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
6d151b8e-d1c1-55b0-9722-16afa746fccf | changelog | pandas | pandas_whatsnew | 0.24.0 | 42 | We have updated our minimum supported versions of dependencies ([GH 21242](https://github.com/pandas-dev/pandas/issues/21242), [GH 18742](https://github.com/pandas-dev/pandas/issues/18742), [GH 23774](https://github.com/pandas-dev/pandas/issues/23774), [GH 24767](https://github.com/pandas-dev/pandas/issues/24767)).
If ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
62de94b0-c63c-54c7-b9fd-324d442638f8 | changelog | pandas | pandas_whatsnew | 0.24.0 | 43 | ### `os.linesep` is used for `line_terminator` of `DataFrame.to_csv`[#](#os-linesep-is-used-for-line-terminator-of-dataframe-to-csv "Link to this heading")
[`DataFrame.to_csv()`](../reference/api/pandas.DataFrame.to_csv.html#pandas.DataFrame.to_csv "pandas.DataFrame.to_csv") now uses `os.linesep()` rather than `'\n'`
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
252be048-d175-5c01-9047-5f0c388c78a4 | changelog | pandas | pandas_whatsnew | 0.24.0 | 44 | ...: print(f.read())
Out[3]: b'string_with_lf,string_with_crlf\r\n"a\r\nbc","a\r\r\nbc"\r\n'
In [4]: # When passing file OBJECT with newline option to
...: # to_csv, line_terminator works.
...: with open("test2.csv", mode='w', newline='\n') as f:
...: data.to_csv(f, index=False, line_terminator='\n... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
43cb1b4b-14d4-51c0-b4bc-5d30a06bbf67 | changelog | pandas | pandas_whatsnew | 0.24.0 | 45 | set, `'\r\n'` is used for line terminator.
```None
In [1]: data = pd.DataFrame({"string_with_lf": ["a\nbc"],
...: "string_with_crlf": ["a\r\nbc"]})
In [2]: data.to_csv("test.csv", index=False)
In [3]: with open("test.csv", mode='rb') as f:
...: print(f.read())
Out[3]: b'string_with_lf,... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
a955e678-13e6-55aa-927c-6118b3f69e51 | changelog | pandas | pandas_whatsnew | 0.24.0 | 46 | ### Proper handling of `np.nan` in a string data-typed column with the Python engine[#](#proper-handling-of-np-nan-in-a-string-data-typed-column-with-the-python-engine "Link to this heading")
There was bug in [`read_excel()`](../reference/api/pandas.read_excel.html#pandas.read_excel "pandas.read_excel") and [`read_csv... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
ca7389ce-9600-5b26-80ec-9595093b3b34 | changelog | pandas | pandas_whatsnew | 0.24.0 | 47 | Out[56]: nan
```
Notice how we now instead output `np.nan` itself instead of a stringified form of it.
### Parsing datetime strings with timezone offsets[#](#parsing-datetime-strings-with-timezone-offsets "Link to this heading")
Previously, parsing datetime strings with UTC offsets with [`to_datetime()`](../referenc... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
597f50ac-4643-5070-973f-e45c67d98b88 | changelog | pandas | pandas_whatsnew | 0.24.0 | 48 | UTC offset ([GH 17697](https://github.com/pandas-dev/pandas/issues/17697), [GH 11736](https://github.com/pandas-dev/pandas/issues/11736), [GH 22457](https://github.com/pandas-dev/pandas/issues/22457))
*Previous behavior*:
```None
In [2]: pd.to_datetime("2015-11-18 15:30:00+05:30")
Out[2]: Timestamp('2015-11-18 10:00:... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
5e373faa-efc2-56aa-8391-ecc5c8776946 | changelog | pandas | pandas_whatsnew | 0.24.0 | 49 | Parsing datetime strings with the same UTC offset will preserve the UTC offset in the `tz`
```None
In [59]: pd.to_datetime(["2015-11-18 15:30:00+05:30"] * 2)
Out[59]: DatetimeIndex(['2015-11-18 15:30:00+05:30', '2015-11-18 15:30:00+05:30'], dtype='datetime64[ns, UTC+05:30]', freq=None)
```
Parsing datetime strings wi... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
1d3c0163-1bad-5779-9ea7-0ca6b1893e98 | changelog | pandas | pandas_whatsnew | 0.24.0 | 50 | ....: "2015-11-18 16:30:00+06:30"], utc=True)
....:
Out[60]: DatetimeIndex(['2015-11-18 10:00:00+00:00', '2015-11-18 10:00:00+00:00'], dtype='datetime64[ns, UTC]', freq=None)
```
### Parsing mixed-timezones with [`read_csv()`](../reference/api/pandas.read_csv.html#pandas.read_csv "pandas.read_cs... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
90d10655-0b83-5745-8885-4d94e8af5a4d | changelog | pandas | pandas_whatsnew | 0.24.0 | 51 | ...: 2000-01-01T00:00:00+06:00"""
In[66]: df = pd.read_csv(io.StringIO(content), parse_dates=['a'])
In[67]: df.a
Out[67]:
0 2000-01-01 00:00:00+05:00
1 2000-01-01 00:00:00+06:00
Name: a, Length: 2, dtype: object
```
As can be seen, the `dtype` is object; each value in the column is a string.
To convert the st... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
6ea6c9d7-9587-5e67-9a9e-c8e5e9052476 | changelog | pandas | pandas_whatsnew | 0.24.0 | 52 | The time values in [`Period`](../reference/api/pandas.Period.html#pandas.Period "pandas.Period") and [`PeriodIndex`](../reference/api/pandas.PeriodIndex.html#pandas.PeriodIndex "pandas.PeriodIndex") objects are now set
to ‘23:59:59.999999999’ when calling [`Series.dt.end_time`](../reference/api/pandas.Series.dt.end_tim... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
02eae3ca-4d6d-5b74-a88c-9ffff7cd674f | changelog | pandas | pandas_whatsnew | 0.24.0 | 53 | *Previous behavior*:
```None
In [2]: p = pd.Period('2017-01-01', 'D')
In [3]: pi = pd.PeriodIndex([p])
In [4]: pd.Series(pi).dt.end_time[0]
Out[4]: Timestamp(2017-01-01 00:00:00)
In [5]: p.end_time
Out[5]: Timestamp(2017-01-01 23:59:59.999999999)
```
*New behavior*:
Calling [`Series.dt.end_time`](../reference/api/... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
a6d2449c-cd5f-5c62-82f0-1b3c019da8dd | changelog | pandas | pandas_whatsnew | 0.24.0 | 54 | ### Series.unique for timezone-aware data[#](#series-unique-for-timezone-aware-data "Link to this heading")
The return type of [`Series.unique()`](../reference/api/pandas.Series.unique.html#pandas.Series.unique "pandas.Series.unique") for datetime with timezone values has changed
from an [`numpy.ndarray`](https://nump... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
51cc2408-edf9-5b64-be09-f132e95fceb7 | changelog | pandas | pandas_whatsnew | 0.24.0 | 55 | In [66]: ser.unique()
Out[66]:
<DatetimeArray>
['2000-01-01 00:00:00+00:00']
Length: 1, dtype: datetime64[ns, UTC]
```
### Sparse data structure refactor[#](#sparse-data-structure-refactor "Link to this heading")
`SparseArray`, the array backing `SparseSeries` and the columns in a `SparseDataFrame`,
is now an extens... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
43580eb5-d9bf-5a3e-978f-c4fda4c2eec5 | changelog | pandas | pandas_whatsnew | 0.24.0 | 56 | * `SparseArray.dtype` and `SparseSeries.dtype` are now instances of [`SparseDtype`](../reference/api/pandas.SparseDtype.html#pandas.SparseDtype "pandas.SparseDtype"), rather than `np.dtype`. Access the underlying dtype with `SparseDtype.subtype`.
* `numpy.asarray(sparse_array)` now returns a dense array with all the va... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
60d81fbc-d6f0-580d-b351-3974e06c9e45 | changelog | pandas | pandas_whatsnew | 0.24.0 | 57 | * The result of [`concat()`](../reference/api/pandas.concat.html#pandas.concat "pandas.concat") with a mix of sparse and dense Series is a Series with sparse values, rather than a `SparseSeries`.
* `SparseDataFrame.combine` and `DataFrame.combine_first` no longer supports combining a sparse column with a dense column w... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
bda38aa4-94b8-58a4-94a2-c349ed2f23f9 | changelog | pandas | pandas_whatsnew | 0.24.0 | 58 | Some new warnings are issued for operations that require or are likely to materialize a large dense array:
* A [`errors.PerformanceWarning`](../reference/api/pandas.errors.PerformanceWarning.html#pandas.errors.PerformanceWarning "pandas.errors.PerformanceWarning") is issued when using fillna with a `method`, as a dens... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
33e2eca8-1036-57d5-b216-7d931ebd8ed9 | changelog | pandas | pandas_whatsnew | 0.24.0 | 59 | Finally, a `Series.sparse` accessor was added to provide sparse-specific methods like [`Series.sparse.from_coo()`](../reference/api/pandas.Series.sparse.from_coo.html#pandas.Series.sparse.from_coo "pandas.Series.sparse.from_coo").
```None
In [67]: s = pd.Series([0, 0, 1, 1, 1], dtype='Sparse[int]')
In [68]: s.sparse.... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
bc6f3315-3a2e-537a-a0b2-f603869818ae | changelog | pandas | pandas_whatsnew | 0.24.0 | 60 | of the columns were dummy-encoded. Now, a [`DataFrame`](../reference/api/pandas.DataFrame.html#pandas.DataFrame "pandas.DataFrame") is always returned ([GH 24284](https://github.com/pandas-dev/pandas/issues/24284)).
*Previous behavior*
The first [`get_dummies()`](../reference/api/pandas.get_dummies.html#pandas.get_du... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
22adca1a-40d8-5429-8fe4-8ad8480845e5 | changelog | pandas | pandas_whatsnew | 0.24.0 | 61 | Now, the return type is consistently a [`DataFrame`](../reference/api/pandas.DataFrame.html#pandas.DataFrame "pandas.DataFrame").
```None
In [69]: type(pd.get_dummies(df, sparse=True))
Out[69]: pandas.core.frame.DataFrame
In [70]: type(pd.get_dummies(df[['B', 'C']], sparse=True))
Out[70]: pandas.core.frame.DataFrame
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
a1ddc46e-b1c9-5f15-ae9d-2d871269468f | changelog | pandas | pandas_whatsnew | 0.24.0 | 62 | ```None
In [71]: df = pd.DataFrame({'a': [1, 2], 'b': [0.5, 0.75]}, index=['A', 'A'])
In [72]: df
Out[72]:
a b
A 1 0.50
A 2 0.75
[2 rows x 2 columns]
In [73]: df.to_dict(orient='index')
---------------------------------------------------------------------------
ValueError T... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
91378a7a-7cf9-5dd1-b823-64e2e4e3bb7a | changelog | pandas | pandas_whatsnew | 0.24.0 | 63 | 2183 defaultdict(<class 'list'>, {'col1': 2, 'col2': 0.75})]
2184 """
2185 from pandas.core.methods.to_dict import to_dict
-> 2187 return to_dict(self, orient, into=into, index=index)
File ~/work/pandas/pandas/pandas/core/methods/to_dict.py:242, in to_dict(df, orient, into, index)
240 elif orient == "ind... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
b8fffedc-e2b0-5f60-8161-23768b6a99a1 | changelog | pandas | pandas_whatsnew | 0.24.0 | 64 |
```None
In [2]: ts = pd.Timestamp('2018-06-11 18:01:14')
In [3]: ts
Out[3]: Timestamp('2018-06-11 18:01:14')
In [4]: tic = pd.offsets.Hour(n=2, normalize=True)
...:
In [5]: tic
Out[5]: <2 * Hours>
In [6]: ts + tic
Out[6]: Timestamp('2018-06-11 00:00:00')
In [7]: ts + tic + tic + tic == ts + (tic + tic + tic)
O... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
4e1db1e0-0456-5681-b126-cee80736fe56 | changelog | pandas | pandas_whatsnew | 0.24.0 | 65 | In [79]: june - april
Out[79]: <2 * MonthEnds>
```
Similarly, subtraction of a `Period` from a `PeriodIndex` will now return
an `Index` of `DateOffset` objects instead of an `Int64Index`
*Previous behavior*:
```None
In [2]: pi = pd.period_range('June 2018', freq='M', periods=3)
In [3]: pi - pi[0]
Out[3]: Int64Index... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
56ed23b2-8770-54d2-a13a-abb2c8399372 | changelog | pandas | pandas_whatsnew | 0.24.0 | 66 | `Series` behavior ([GH 22163](https://github.com/pandas-dev/pandas/issues/22163))
```None
In [82]: df = pd.DataFrame([pd.Timedelta(days=1)])
In [83]: df
Out[83]:
0
0 1 days
[1 rows x 1 columns]
```
*Previous behavior*:
```None
In [4]: df = pd.DataFrame([pd.Timedelta(days=1)])
In [5]: df - np.nan
Out[5]:
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
f63511de-8b4d-5135-b81e-cea03ca66f2e | changelog | pandas | pandas_whatsnew | 0.24.0 | 67 | The affected cases are:
* operating against a 2-dimensional `np.ndarray` with either 1 row or 1 column will now broadcast the same way a `np.ndarray` would ([GH 23000](https://github.com/pandas-dev/pandas/issues/23000)).
* a list or tuple with length matching the number of rows in the [`DataFrame`](../reference/api/pa... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
4133b426-9196-587e-b72b-53b09e2dd2fc | changelog | pandas | pandas_whatsnew | 0.24.0 | 68 | ...: # comparison previously broadcast where arithmetic would raise
Out[5]:
0 1
0 True True
1 False False
2 False False
In [6]: df + arr[[0], :]
...
ValueError: Unable to coerce to DataFrame, shape must be (3, 2): given (1, 2)
In [7]: df == (1, 2)
...: # length matches number of columns;
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
b39a3eaa-7015-5dd1-b171-07ce99a5dda1 | changelog | pandas | pandas_whatsnew | 0.24.0 | 69 | 2 False False
[3 rows x 2 columns]
In [88]: df + arr[[0], :]
Out[88]:
0 1
0 0 2
1 2 4
2 4 6
[3 rows x 2 columns]
```
```None
# Comparison operations and arithmetic operations both broadcast.
In [89]: df == (1, 2)
Out[89]:
0 1
0 False False
1 False False
2 False False
[3 rows x 2 col... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
83ede3b7-ce16-5a7a-b9ff-bf92504f584a | changelog | pandas | pandas_whatsnew | 0.24.0 | 70 | `np.ndarray` objects now broadcast in the same way as `np.ndarray`
broadcast. ([GH 23000](https://github.com/pandas-dev/pandas/issues/23000))
```None
In [91]: arr = np.arange(6).reshape(3, 2)
In [92]: df = pd.DataFrame(arr)
In [93]: df
Out[93]:
0 1
0 0 1
1 2 3
2 4 5
[3 rows x 2 columns]
```
*Previous be... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.24.0.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.