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 |
|---|---|---|---|---|---|---|---|
c02729b3-3c5a-5c92-9a03-f4ab61f453ec | changelog | pandas | pandas_whatsnew | 0.21.0 | 86 | * Fixes regression when sorting by multiple columns on a `datetime64` dtype `Series` with `NaT` values ([GH 16836](https://github.com/pandas-dev/pandas/issues/16836))
* Bug in [`pivot_table()`](../reference/api/pandas.pivot_table.html#pandas.pivot_table "pandas.pivot_table") where the result’s columns did not preserve ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.0.md |
b7ac3cdd-a08e-5fd7-84d7-2e771a3ef6de | changelog | pandas | pandas_whatsnew | 0.21.0 | 87 | ### Numeric[#](#numeric "Link to this heading")
* Bug in `.clip()` with `axis=1` and a list-like for `threshold` is passed; previously this raised `ValueError` ([GH 15390](https://github.com/pandas-dev/pandas/issues/15390))
* [`Series.clip()`](../reference/api/pandas.Series.clip.html#pandas.Series.clip "pandas.Series.... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.0.md |
c146002e-5386-5d44-90d1-a32b84f45191 | changelog | pandas | pandas_whatsnew | 0.21.0 | 88 | * Bug in the categorical constructor with empty values and categories causing the `.categories` to be an empty `Float64Index` rather than an empty `Index` with object dtype ([GH 17248](https://github.com/pandas-dev/pandas/issues/17248))
* Bug in categorical operations with [Series.cat](../user_guide/categorical.html#ca... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.0.md |
255ebfbb-b901-5fb8-afed-47e4f1a892f0 | changelog | pandas | pandas_whatsnew | 0.21.0 | 89 | ### PyPy[#](#pypy "Link to this heading")
* Compatibility with PyPy in [`read_csv()`](../reference/api/pandas.read_csv.html#pandas.read_csv "pandas.read_csv") with `usecols=[<unsorted ints>]` and
[`read_json()`](../reference/api/pandas.read_json.html#pandas.read_json "pandas.read_json") ([GH 17351](https://github.co... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.0.md |
0df65807-3025-5558-89ec-4626e24589f6 | changelog | pandas | pandas_whatsnew | 0.21.0 | 90 | ### Other[#](#other "Link to this heading")
* Bug where some inplace operators were not being wrapped and produced a copy when invoked ([GH 12962](https://github.com/pandas-dev/pandas/issues/12962))
* Bug in [`eval()`](../reference/api/pandas.eval.html#pandas.eval "pandas.eval") where the `inplace` parameter was being... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.0.md |
88fc6ba1-074c-595e-a282-d48e0443c222 | changelog | pandas | pandas_whatsnew | 0.21.0 | 91 | * Chris Filo Gorgolewski +
* Chris Kerr
* Chris M +
* Chris Mazzullo +
* Christian Prinoth
* Christian Stade-Schuldt
* Christoph Moehl +
* DSM
* Daniel Chen +
* Daniel Grady
* Daniel Himmelstein
* Dave Willmer
* David Cook
* David Gwynne
* David Read +
* Dillon Niederhut +
* Douglas Rudd
* Eric Stein +
* Eric Wieser +
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.0.md |
a118b8a3-29a0-5f67-a848-f55e71c6c9c5 | changelog | pandas | pandas_whatsnew | 0.21.0 | 92 | * Kirk Hansen +
* Licht Takeuchi +
* Lucas Kushner +
* Mahdi Ben Jelloul +
* Makarov Andrey +
* Malgorzata Turzanska +
* Marc Garcia +
* Margaret Sy +
* MarsGuy +
* Matt Bark +
* Matthew Roeschke
* Matti Picus
* Mehmet Ali “Mali” Akmanalp
* Michael Gasvoda +
* Michael Penkov +
* Milo +
* Morgan Stuart +
* Morgan243 +
*... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.0.md |
109abf79-f551-5c81-8f4d-9e05caaa27a3 | changelog | pandas | pandas_whatsnew | 0.21.0 | 93 | * andymaheshw +
* ante328 +
* aviolov +
* bpraggastis
* cbertinato +
* cclauss +
* chernrick
* chris-b1
* dkamm +
* dwkenefick
* economy
* faic +
* fding253 +
* gfyoung
* guygoldberg +
* hhuuggoo +
* huashuai +
* ian
* iulia +
* jaredsnyder
* jbrockmendel +
* jdeschenes
* jebob +
* jschendel +
* keitakurita
* kernc +
*... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.0.md |
14a0d34f-2242-5905-a3af-a8933283ac09 | changelog | pandas | pandas_whatsnew | 0.21.1 | 0 | # What's new in pandas 0.21.1
Source: https://pandas.pydata.org/docs/whatsnew/v0.21.1.html
# Version 0.21.1 (December 12, 2017)[#](#version-0-21-1-december-12-2017 "Link to this heading")
This is a minor bug-fix release in the 0.21.x series and includes some small regression fixes,
bug fixes and performance improvem... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
d509009b-330c-5c35-b5ab-071d04e51cb9 | changelog | pandas | pandas_whatsnew | 0.21.1 | 1 | + [Other enhancements](#other-enhancements)
* [Deprecations](#deprecations)
* [Performance improvements](#performance-improvements)
* [Bug fixes](#bug-fixes)
+ [Conversion](#conversion)
+ [Indexing](#indexing)
+ [IO](#io)
+ [Plotting](#plotting)
+ [GroupBy/resample/rolling](#groupby-resample-rolling)
+ [... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
9f3afeb2-9ae0-5864-b8e6-74280d591a1d | changelog | pandas | pandas_whatsnew | 0.21.1 | 2 | being present for regular `matplotlib.pyplot` plotting methods, so we’re
temporarily reverting that change; pandas 0.21.1 again registers the converters on
import, just like before 0.21.0.
We’ve added a new option to control the converters:
`pd.options.plotting.matplotlib.register_converters`. By default, they are
reg... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
5fd7305b-f70d-5b20-b1d7-31a9081616d3 | changelog | pandas | pandas_whatsnew | 0.21.1 | 3 | deprecate the automatic registration of converters in favor of users explicitly
registering them when they want them.
## New features[#](#new-features "Link to this heading")
### Improvements to the Parquet IO functionality[#](#improvements-to-the-parquet-io-functionality "Link to this heading")
* [`DataFrame.to_par... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
849c0f33-9955-5a47-a023-c92a34686fc5 | changelog | pandas | pandas_whatsnew | 0.21.1 | 4 | * [`read_parquet()`](../reference/api/pandas.read_parquet.html#pandas.read_parquet "pandas.read_parquet") now allows to specify kwargs which are passed to the respective engine ([GH 18216](https://github.com/pandas-dev/pandas/issues/18216))
### Other enhancements[#](#other-enhancements "Link to this heading")
* [`Tim... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
b76b9359-8c15-56eb-a745-034dcda9ddcf | changelog | pandas | pandas_whatsnew | 0.21.1 | 5 | [`pandas.plotting.register_matplotlib_converters()`](../reference/api/pandas.plotting.register_matplotlib_converters.html#pandas.plotting.register_matplotlib_converters "pandas.plotting.register_matplotlib_converters") ([GH 18301](https://github.com/pandas-dev/pandas/issues/18301))
## Performance improvements[#](#pe... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
d56975d5-fb48-5a3e-a3fa-742eca1cf69b | changelog | pandas | pandas_whatsnew | 0.21.1 | 6 | * Bug in [`DatetimeIndex`](../reference/api/pandas.DatetimeIndex.html#pandas.DatetimeIndex "pandas.DatetimeIndex") subtracting datetimelike from DatetimeIndex could fail to overflow ([GH 18020](https://github.com/pandas-dev/pandas/issues/18020))
* Bug in `IntervalIndex.copy()` when copying and `IntervalIndex` with non-... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
94d56d7f-546b-5cc9-93cb-e3f677c3f70f | changelog | pandas | pandas_whatsnew | 0.21.1 | 7 | * Bug in `DateTimeIndex` and [`date_range()`](../reference/api/pandas.date_range.html#pandas.date_range "pandas.date_range") where mismatching tz-aware `start` and `end` timezones would not raise an err if `end.tzinfo` is None ([GH 18431](https://github.com/pandas-dev/pandas/issues/18431))
* Bug in [`Series.fillna()`](... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
2936c799-b49f-58ae-8dcf-861da28f5741 | changelog | pandas | pandas_whatsnew | 0.21.1 | 8 | * Bug in [`IntervalIndex`](../reference/api/pandas.IntervalIndex.html#pandas.IntervalIndex "pandas.IntervalIndex") constructor when a list of intervals is passed with non-default `closed` ([GH 18334](https://github.com/pandas-dev/pandas/issues/18334))
* Bug in `Index.putmask` when an invalid mask passed ([GH 18368](htt... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
2b82b5fc-0604-5363-8d66-a7b50e93c567 | changelog | pandas | pandas_whatsnew | 0.21.1 | 9 | * Bug in [`read_csv()`](../reference/api/pandas.read_csv.html#pandas.read_csv "pandas.read_csv") when reading a compressed UTF-16 encoded file ([GH 18071](https://github.com/pandas-dev/pandas/issues/18071))
* Bug in [`read_csv()`](../reference/api/pandas.read_csv.html#pandas.read_csv "pandas.read_csv") for handling nul... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
3a58e988-1852-565b-83b9-a077318a3ab2 | changelog | pandas | pandas_whatsnew | 0.21.1 | 10 | * Bug in parsing integer datetime-like columns with specified format in `read_sql` ([GH 17855](https://github.com/pandas-dev/pandas/issues/17855)).
* Bug in `DataFrame.to_msgpack()` when serializing data of the `numpy.bool_` datatype ([GH 18390](https://github.com/pandas-dev/pandas/issues/18390))
* Bug in [`read_json()... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
ed72c73b-67cf-59f9-aed6-160115d7589e | changelog | pandas | pandas_whatsnew | 0.21.1 | 11 | * Bug in [`DataFrame.to_latex()`](../reference/api/pandas.DataFrame.to_latex.html#pandas.DataFrame.to_latex "pandas.DataFrame.to_latex") with `longtable=True` where a latex multicolumn always spanned over three columns ([GH 17959](https://github.com/pandas-dev/pandas/issues/17959))
### Plotting[#](#plotting "Link to t... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
0181b713-dbc0-551e-87fd-11090b1e142f | changelog | pandas | pandas_whatsnew | 0.21.1 | 12 | * Bug in `DataFrame.resample(...)` when there is a time change (DST) and resampling frequency is 12h or higher ([GH 15549](https://github.com/pandas-dev/pandas/issues/15549))
* Bug in `pd.DataFrameGroupBy.count()` when counting over a datetimelike column ([GH 13393](https://github.com/pandas-dev/pandas/issues/13393))
*... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
ed2d0cb2-55de-546a-bfac-8f7185654d9d | changelog | pandas | pandas_whatsnew | 0.21.1 | 13 | * Bug in `DataFrame.filter(...)` when `unicode` is passed as a condition in Python 2 ([GH 13101](https://github.com/pandas-dev/pandas/issues/13101))
* Bug when merging empty DataFrames when `np.seterr(divide='raise')` is set ([GH 17776](https://github.com/pandas-dev/pandas/issues/17776))
### Numeric[#](#numeric "Link ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
f263c5a0-2c3f-5600-b82a-072af081ebb0 | changelog | pandas | pandas_whatsnew | 0.21.1 | 14 | * `CategoricalIndex` can now correctly take a `pd.api.types.CategoricalDtype` as its dtype ([GH 18116](https://github.com/pandas-dev/pandas/issues/18116))
* Bug in `Categorical.unique()` returning read-only `codes` array when all categories were `NaN` ([GH 18051](https://github.com/pandas-dev/pandas/issues/18051))
* Bu... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
26768904-4cc4-5994-bc9b-2195f5fd89a2 | changelog | pandas | pandas_whatsnew | 0.21.1 | 15 | * Alexander Michael Schade +
* Chris Mazzullo
* Cornelius Riemenschneider +
* Dave Hirschfeld +
* David Fischer +
* David Stansby +
* Dror Atariah +
* Eric Kisslinger +
* Hans +
* Ingolf Becker +
* Jan Werkmann +
* Jeff Reback
* Joris Van den Bossche
* Jörg Döpfert +
* Kevin Kuhl +
* Krzysztof Chomski +
* Leif Walsh
* ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.21.1.md |
bb1fee37-b265-5ba4-867a-61dae480e705 | changelog | pandas | pandas_whatsnew | 0.22.0 | 0 | # What's new in pandas 0.22.0
Source: https://pandas.pydata.org/docs/whatsnew/v0.22.0.html
# Version 0.22.0 (December 29, 2017)[#](#version-0-22-0-december-29-2017 "Link to this heading")
This is a major release from 0.21.1 and includes a single, API-breaking change.
We recommend that all users upgrade to this versi... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.22.0.md |
7d6b8136-9dea-5d56-878e-a0fa9530eb91 | changelog | pandas | pandas_whatsnew | 0.22.0 | 1 | Some background: In pandas 0.21, we fixed a long-standing inconsistency
in the return value of all-*NA* series depending on whether or not bottleneck
was installed. See [Sum/prod of all-NaN or empty Series/DataFrames is now consistently NaN](v0.21.0.html#whatsnew-0210-api-breaking-bottleneck). At the same
time, we chan... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.22.0.md |
5cb9c420-4f97-53ba-91ff-7494847ed89a | changelog | pandas | pandas_whatsnew | 0.22.0 | 2 | To have the sum of an empty series return `NaN` (the default behavior of
pandas 0.20.3 without bottleneck, or pandas 0.21.x), use the `min_count`
keyword.
```None
In [3]: pd.Series([]).sum(min_count=1)
Out[3]: nan
```
Thanks to the `skipna` parameter, the `.sum` on an all-*NA*
series is conceptually the same as the `... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.22.0.md |
26680509-8e0f-5032-811b-99e6af885135 | changelog | pandas | pandas_whatsnew | 0.22.0 | 3 | These changes affect [`DataFrame.sum()`](../reference/api/pandas.DataFrame.sum.html#pandas.DataFrame.sum "pandas.DataFrame.sum") and [`DataFrame.prod()`](../reference/api/pandas.DataFrame.prod.html#pandas.DataFrame.prod "pandas.DataFrame.prod") as well.
Finally, a few less obvious places in pandas are affected by this ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.22.0.md |
96814570-3e31-5406-b39a-4f8f99f2a240 | changelog | pandas | pandas_whatsnew | 0.22.0 | 4 | To restore the 0.21 behavior of returning `NaN` for unobserved groups,
use `min_count>=1`.
```None
In [10]: pd.Series([1, 2]).groupby(grouper, observed=False).sum(min_count=1)
Out[10]:
a 3.0
b NaN
Length: 2, dtype: float64
```
### Resample[#](#resample "Link to this heading")
The sum and product of all-*NA* b... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.22.0.md |
1dd82557-52ee-5176-8724-a15a674969c5 | changelog | pandas | pandas_whatsnew | 0.22.0 | 5 | To restore the 0.21 behavior of returning `NaN`, use `min_count>=1`.
```None
In [13]: s.resample("2d").sum(min_count=1)
Out[13]:
2017-01-01 2.0
2017-01-03 NaN
Freq: 2D, Length: 2, dtype: float64
```
In particular, upsampling and taking the sum or product is affected, as
upsampling introduces missing values eve... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.22.0.md |
15a25293-5f1e-5b55-bec0-9932f8e5567e | changelog | pandas | pandas_whatsnew | 0.22.0 | 6 | In [16]: pd.Series([1, 2], index=idx).resample("12H").sum(min_count=1)
Out[16]:
2017-01-01 00:00:00 1.0
2017-01-01 12:00:00 NaN
2017-01-02 00:00:00 2.0
Freq: 12H, Length: 3, dtype: float64
```
### Rolling and expanding[#](#rolling-and-expanding "Link to this heading")
Rolling and expanding already have a `mi... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.22.0.md |
117b0b6d-3ee8-59d3-80ab-5a68fa87fe16 | changelog | pandas | pandas_whatsnew | 0.22.0 | 7 | ## Compatibility[#](#compatibility "Link to this heading")
If you maintain a library that should work across pandas versions, it
may be easiest to exclude pandas 0.21 from your requirements. Otherwise, all your
`sum()` calls would need to check if the `Series` is empty before summing.
With setuptools, in your `setup.... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.22.0.md |
333ef8fe-e247-503e-a224-3e8e697347df | changelog | pandas | pandas_whatsnew | 0.23.0 | 0 | # What's new in pandas 0.23.0
Source: https://pandas.pydata.org/docs/whatsnew/v0.23.0.html
# What’s new in 0.23.0 (May 15, 2018)[#](#what-s-new-in-0-23-0-may-15-2018 "Link to this heading")
This is a major release from 0.22.0 and includes a number of API changes,
deprecations, new features, enhancements, and perform... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
1350b32d-47cf-5b21-8a71-45d7b4774afa | changelog | pandas | pandas_whatsnew | 0.23.0 | 1 | * [Excluding unobserved categories from groupby](#whatsnew-0230-enhancements-categorical-grouping).
* [Changes to make output shape of DataFrame.apply consistent](#whatsnew-0230-api-breaking-apply).
Check the [API Changes](#whatsnew-0230-api-breaking) and [deprecations](#whatsnew-0230-deprecations) before updating.
W... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
70c5adeb-a838-5c4f-a008-ef04b0fc8442 | changelog | pandas | pandas_whatsnew | 0.23.0 | 2 | + [Extending pandas with custom types (experimental)](#extending-pandas-with-custom-types-experimental)
+ [New `observed` keyword for excluding unobserved categories in `GroupBy`](#new-observed-keyword-for-excluding-unobserved-categories-in-groupby)
+ [Rolling/Expanding.apply() accepts `raw=False` to pass a `Seri... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
9061c8e4-2858-5aca-bc02-eb14a6d2c1fd | changelog | pandas | pandas_whatsnew | 0.23.0 | 3 | + [`DataFrame.astype` performs column-wise conversion to `Categorical`](#dataframe-astype-performs-column-wise-conversion-to-categorical)
+ [Other enhancements](#other-enhancements)
* [Backwards incompatible API changes](#backwards-incompatible-api-changes)
+ [Dependencies have increased minimum versions](#depen... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
a24d7747-4fa8-5b44-8d23-ce5032c6d182 | changelog | pandas | pandas_whatsnew | 0.23.0 | 4 | + [Extraction of matching patterns from strings](#extraction-of-matching-patterns-from-strings)
+ [Default value for the `ordered` parameter of `CategoricalDtype`](#default-value-for-the-ordered-parameter-of-categoricaldtype)
+ [Better pretty-printing of DataFrames in a terminal](#better-pretty-printing-of-datafr... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
cfeb4d30-7a18-564f-9b26-ffafec006965 | changelog | pandas | pandas_whatsnew | 0.23.0 | 5 | + [GroupBy/resample/rolling](#groupby-resample-rolling)
+ [Sparse](#sparse)
+ [Reshaping](#reshaping)
+ [Other](#other)
* [Contributors](#contributors)
## New features[#](#new-features "Link to this heading")
### JSON read/write round-trippable with `orient='table'`[#](#json-read-write-round-trippable-with-or... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
315bc260-347c-5350-b69a-fdf59e404939 | changelog | pandas | pandas_whatsnew | 0.23.0 | 6 | ...: 'qux': pd.Categorical(['a', 'b', 'c', 'c'])},
...: index=pd.Index(range(4), name='idx'))
...:
In [2]: df
Out[2]:
foo bar baz qux
idx
0 1 a 2018-01-01 a
1 2 b 2018-01-02 b
2 3 c 2018-01-03 c
3 4 d ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
3b7b41f1-a6cd-5b43-9ffd-c084c570c51f | changelog | pandas | pandas_whatsnew | 0.23.0 | 7 | Please note that the string `index` is not supported with the round trip format, as it is used by default in `write_json` to indicate a missing index name.
```None
In [8]: df.index.name = 'index'
In [9]: df.to_json('test.json', orient='table')
In [10]: new_df = pd.read_json('test.json', orient='table')
In [11]: new... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
2cae3e30-e0e8-55d2-99f2-6961bdeb22ef | changelog | pandas | pandas_whatsnew | 0.23.0 | 8 | The [`DataFrame.assign()`](../reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign "pandas.DataFrame.assign") now accepts dependent keyword arguments for python version later than 3.6 (see also [PEP 468](https://www.python.org/dev/peps/pep-0468/)). Later keyword arguments may now refer to earlier ones if ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
721a8749-70e5-5979-951d-4dcf1ee66ed6 | changelog | pandas | pandas_whatsnew | 0.23.0 | 9 | In [2]: df = pd.DataFrame({"A": [1, 2, 3]})
In [3]: df.assign(A=lambda df: df.A + 1, C=lambda df: df.A * -1)
Out[3]:
A C
0 2 -1
1 3 -2
2 4 -3
```
New behavior:
```None
In [16]: df.assign(A=df.A + 1, C=lambda df: df.A * -1)
Out[16]:
A C
0 2 -2
1 3 -3
2 4 -4
[3 rows x 2 columns]
```
### Merging on a c... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
cf7a21c6-f4a9-5f30-a946-b38071e22f54 | changelog | pandas | pandas_whatsnew | 0.23.0 | 10 | In [17]: left_index = pd.Index(['K0', 'K0', 'K1', 'K2'], name='key1')
In [18]: left = pd.DataFrame({'A': ['A0', 'A1', 'A2', 'A3'],
....: 'B': ['B0', 'B1', 'B2', 'B3'],
....: 'key2': ['K0', 'K1', 'K0', 'K1']},
....: index=left_index)
....:
In [... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
41af2a1c-71ae-5a38-8c6c-5035337fe938 | changelog | pandas | pandas_whatsnew | 0.23.0 | 11 | ### Sorting by a combination of columns and index levels[#](#sorting-by-a-combination-of-columns-and-index-levels "Link to this heading")
Strings passed to [`DataFrame.sort_values()`](../reference/api/pandas.DataFrame.sort_values.html#pandas.DataFrame.sort_values "pandas.DataFrame.sort_values") as the `by` parameter m... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
0ce60df1-3a1d-54a4-b1e8-cc5a4c36af32 | changelog | pandas | pandas_whatsnew | 0.23.0 | 12 | ....: index=idx)
....:
In [25]: df_multi
Out[25]:
A
first second
a 1 6
2 5
2 4
b 2 3
1 2
1 1
[6 rows x 1 columns]
# Sort by 'second' (index) and 'A' (column)
In [26]: df_multi.sort_values(by=['second'... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
812524ad-e8fa-568e-9634-da39f502b7df | changelog | pandas | pandas_whatsnew | 0.23.0 | 13 | As a demonstration, we’ll use [cyberpandas](https://cyberpandas.readthedocs.io/en/latest/), which provides an `IPArray` type
for storing ip addresses.
```None
In [1]: from cyberpandas import IPArray
In [2]: values = IPArray([
...: 0,
...: 3232235777,
...: 42540766452641154071740215577757643572
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
9cdf0170-473d-5c16-8326-8063ce13e51e | changelog | pandas | pandas_whatsnew | 0.23.0 | 14 | For more, see the [extension types](../development/extending.html#extending-extension-types)
documentation. If you build an extension array, publicize it on [the ecosystem page](https://pandas.pydata.org/community/ecosystem.html).
### New `observed` keyword for excluding unobserved categories in `GroupBy`[#](#new-obse... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
68b33d77-18b0-5dc1-af81-88c3eba60088 | changelog | pandas | pandas_whatsnew | 0.23.0 | 15 | `observed=False` for backward-compatibility. ([GH 14942](https://github.com/pandas-dev/pandas/issues/14942), [GH 8138](https://github.com/pandas-dev/pandas/issues/8138), [GH 15217](https://github.com/pandas-dev/pandas/issues/15217), [GH 17594](https://github.com/pandas-dev/pandas/issues/17594), [GH 8669](https://github... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
86fbddb7-6a36-57e7-be63-04624078a613 | changelog | pandas | pandas_whatsnew | 0.23.0 | 16 | [4 rows x 4 columns]
```
To show all values, the previous behavior:
```None
In [32]: df.groupby(['A', 'B', 'C'], observed=False).count()
Out[32]:
values
A B C
a c bar 0
foo 1
d bar 1
foo 0
y bar 0
... ...
z c foo 0
d bar 0
foo ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
5ebd16df-31da-500e-9f64-da96842b6711 | changelog | pandas | pandas_whatsnew | 0.23.0 | 17 | In [36]: df = pd.DataFrame({"A": cat1, "B": cat2, "values": [1, 2, 3, 4]})
In [37]: df
Out[37]:
A B values
0 a c 1
1 a d 2
2 b c 3
3 b d 4
[4 rows x 3 columns]
```
```None
In [1]: pd.pivot_table(df, values='values', index=['A', 'B'], dropna=True)
Out[1]:
values
A B
a c ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
6b825470-c85d-5d93-9934-71d3fc1aa5eb | changelog | pandas | pandas_whatsnew | 0.23.0 | 18 | This is similar to `DataFame.apply()`. This parameter, if `True` allows one to send a `np.ndarray` to the applied function. If `False` a `Series` will be passed. The
default is `None`, which preserves backward compatibility, so this will default to `True`, sending an `np.ndarray`.
In a future version the default will b... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
9cc6ba5a-b954-54e1-af78-34c31734466b | changelog | pandas | pandas_whatsnew | 0.23.0 | 19 | Length: 5, dtype: float64
```
### `DataFrame.interpolate` has gained the `limit_area` kwarg[#](#dataframe-interpolate-has-gained-the-limit-area-kwarg "Link to this heading")
[`DataFrame.interpolate()`](../reference/api/pandas.DataFrame.interpolate.html#pandas.DataFrame.interpolate "pandas.DataFrame.interpolate") has ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
f48d69ec-09b2-5f63-9d44-e15ac87c5730 | changelog | pandas | pandas_whatsnew | 0.23.0 | 20 | Length: 9, dtype: float64
```
Fill one consecutive inside value in both directions
```None
In [44]: ser.interpolate(limit_direction='both', limit_area='inside', limit=1)
Out[44]:
0 NaN
1 NaN
2 5.0
3 7.0
4 NaN
5 11.0
6 13.0
7 NaN
8 NaN
Length: 9, dtype: float64
```
Fill all consecut... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
5441c80b-1a74-5669-a8cb-5e13af0332c0 | changelog | pandas | pandas_whatsnew | 0.23.0 | 21 | ### Function `get_dummies` now supports `dtype` argument[#](#function-get-dummies-now-supports-dtype-argument "Link to this heading")
The [`get_dummies()`](../reference/api/pandas.get_dummies.html#pandas.get_dummies "pandas.get_dummies") now accepts a `dtype` argument, which specifies a dtype for the new columns. The ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
ac250bee-dd27-5273-bd75-f2dbfc895285 | changelog | pandas | pandas_whatsnew | 0.23.0 | 22 | See the [documentation here](../user_guide/timedeltas.html#timedeltas-mod-divmod). ([GH 19365](https://github.com/pandas-dev/pandas/issues/19365))
```None
In [50]: td = pd.Timedelta(hours=37)
In [51]: td % pd.Timedelta(minutes=45)
Out[51]: Timedelta('0 days 00:15:00')
```
### Method `.rank()` handles `inf` values wh... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
ee10c598-74aa-508f-ad4a-ffd5876c6b95 | changelog | pandas | pandas_whatsnew | 0.23.0 | 23 | Furthermore, previously if you rank `inf` or `-inf` values together with `NaN` values, the calculation won’t distinguish `NaN` from infinity when using ‘top’ or ‘bottom’ argument.
```None
In [55]: s = pd.Series([np.nan, np.nan, -np.inf, -np.inf])
In [56]: s
Out[56]:
0 NaN
1 NaN
2 -inf
3 -inf
Length: 4, dty... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
8ffe77fb-526f-57d9-a632-8d9ffd175ad1 | changelog | pandas | pandas_whatsnew | 0.23.0 | 24 | * Bug in [`DataFrame.rank()`](../reference/api/pandas.DataFrame.rank.html#pandas.DataFrame.rank "pandas.DataFrame.rank") and [`Series.rank()`](../reference/api/pandas.Series.rank.html#pandas.Series.rank "pandas.Series.rank") when `method='dense'` and `pct=True` in which percentile ranks were not being used with the num... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
dc6ebc01-5b0e-541c-9d5e-077ccf914470 | changelog | pandas | pandas_whatsnew | 0.23.0 | 25 | ### `Series.str.cat` has gained the `join` kwarg[#](#series-str-cat-has-gained-the-join-kwarg "Link to this heading")
Previously, [`Series.str.cat()`](../reference/api/pandas.Series.str.cat.html#pandas.Series.str.cat "pandas.Series.str.cat") did not – in contrast to most of `pandas` – align [`Series`](../reference/api... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
bfc52d14-b191-5db2-8a6c-a1eb6fd213fe | changelog | pandas | pandas_whatsnew | 0.23.0 | 26 | Out[61]:
0 a-
1 bb
2 cc
3 dd
Length: 4, dtype: object
```
Furthermore, [`Series.str.cat()`](../reference/api/pandas.Series.str.cat.html#pandas.Series.str.cat "pandas.Series.str.cat") now works for `CategoricalIndex` as well (previously raised a `ValueError`; see [GH 20842](https://github.com/pandas-dev/pa... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
21558347-c636-5966-8ff4-162ced8dee59 | changelog | pandas | pandas_whatsnew | 0.23.0 | 27 | [Object creation](../user_guide/categorical.html#categorical-objectcreation) section of the documentation for more details and examples. ([GH 12860](https://github.com/pandas-dev/pandas/issues/12860), [GH 18099](https://github.com/pandas-dev/pandas/issues/18099))
Supplying the string `'category'` performs column-wise ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
1323e52c-d360-5354-a038-5ff01ac17e0a | changelog | pandas | pandas_whatsnew | 0.23.0 | 28 | In [68]: cdt = CategoricalDtype(categories=list('abcd'), ordered=True)
In [69]: df = df.astype(cdt)
In [70]: df['A'].dtype
Out[70]: CategoricalDtype(categories=['a', 'b', 'c', 'd'], ordered=True, categories_dtype=object)
In [71]: df['B'].dtype
Out[71]: CategoricalDtype(categories=['a', 'b', 'c', 'd'], ordered=True, ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
8f19ca17-def7-5ac6-a2cb-2409b827ff8e | changelog | pandas | pandas_whatsnew | 0.23.0 | 29 | * [`pandas.tseries.frequencies.to_offset()`](../reference/api/pandas.tseries.frequencies.to_offset.html#pandas.tseries.frequencies.to_offset "pandas.tseries.frequencies.to_offset") now accepts leading ‘+’ signs e.g. ‘+1h’. ([GH 18171](https://github.com/pandas-dev/pandas/issues/18171))
* `MultiIndex.unique()` now suppo... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
160488de-5789-523d-bc53-60a524214944 | changelog | pandas | pandas_whatsnew | 0.23.0 | 30 | * [`pandas.io.formats.style.Styler`](../reference/api/pandas.io.formats.style.Styler.html#pandas.io.formats.style.Styler "pandas.io.formats.style.Styler") now has method `hide_columns()` to determine whether columns will be hidden in output ([GH 14194](https://github.com/pandas-dev/pandas/issues/14194))
* Improved word... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
929eb47d-40f4-5e8e-9449-9d2be297dca0 | changelog | pandas | pandas_whatsnew | 0.23.0 | 31 | * [`pandas.read_clipboard()`](../reference/api/pandas.read_clipboard.html#pandas.read_clipboard "pandas.read_clipboard") updated to use qtpy, falling back to PyQt5 and then PyQt4, adding compatibility with Python3 and multiple python-qt bindings ([GH 17722](https://github.com/pandas-dev/pandas/issues/17722))
* Improved... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
4ae31310-72fa-5d40-bce5-f14bf765dd32 | changelog | pandas | pandas_whatsnew | 0.23.0 | 32 | * [`IntervalIndex`](../reference/api/pandas.IntervalIndex.html#pandas.IntervalIndex "pandas.IntervalIndex") now supports time zone aware `Interval` objects ([GH 18537](https://github.com/pandas-dev/pandas/issues/18537), [GH 18538](https://github.com/pandas-dev/pandas/issues/18538))
* [`Series()`](../reference/api/panda... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
0e271e0b-8e93-5e65-9cd2-83787bd0e989 | changelog | pandas | pandas_whatsnew | 0.23.0 | 33 | * `DataFrame.append()` can now in more cases preserve the type of the calling dataframe’s columns (e.g. if both are `CategoricalIndex`) ([GH 18359](https://github.com/pandas-dev/pandas/issues/18359))
* [`DataFrame.to_json()`](../reference/api/pandas.DataFrame.to_json.html#pandas.DataFrame.to_json "pandas.DataFrame.to_j... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
59cb937b-97b5-5564-92b9-9c18302ef305 | changelog | pandas | pandas_whatsnew | 0.23.0 | 34 | * `Categorical.rename_categories`, `CategoricalIndex.rename_categories` and [`Series.cat.rename_categories`](../reference/api/pandas.Series.cat.rename_categories.html#pandas.Series.cat.rename_categories "pandas.Series.cat.rename_categories")
can now take a callable as their argument ([GH 18862](https://github.com/pan... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
ce2d17b2-f0e1-598b-b383-0fcfbd71a0e4 | changelog | pandas | pandas_whatsnew | 0.23.0 | 35 | * [`is_scalar()`](../reference/api/pandas.api.types.is_scalar.html#pandas.api.types.is_scalar "pandas.api.types.is_scalar") now returns `True` for `DateOffset` objects ([GH 18943](https://github.com/pandas-dev/pandas/issues/18943)).
* [`DataFrame.pivot()`](../reference/api/pandas.DataFrame.pivot.html#pandas.DataFrame.p... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
2615362b-371a-5478-92ec-536c30aba1f5 | changelog | pandas | pandas_whatsnew | 0.23.0 | 36 | [`pandas.api.extensions.register_index_accessor()`](../reference/api/pandas.api.extensions.register_index_accessor.html#pandas.api.extensions.register_index_accessor "pandas.api.extensions.register_index_accessor"), accessor for libraries downstream of pandas
to register custom accessors like `.cat` on pandas objec... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
4df5dc3a-81a4-5175-916d-9f91effc20df | changelog | pandas | pandas_whatsnew | 0.23.0 | 37 | * Added `SeriesGroupBy.is_monotonic_increasing()` and `SeriesGroupBy.is_monotonic_decreasing()` ([GH 17015](https://github.com/pandas-dev/pandas/issues/17015))
* For subclassed `DataFrames`, [`DataFrame.apply()`](../reference/api/pandas.DataFrame.apply.html#pandas.DataFrame.apply "pandas.DataFrame.apply") will now pres... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
a36dc643-e59a-55b1-a48a-0be52be7f5d6 | changelog | pandas | pandas_whatsnew | 0.23.0 | 38 | * Added option `display.html.use_mathjax` so [MathJax](https://www.mathjax.org/) can be disabled when rendering tables in `Jupyter` notebooks ([GH 19856](https://github.com/pandas-dev/pandas/issues/19856), [GH 19824](https://github.com/pandas-dev/pandas/issues/19824))
* [`DataFrame.replace()`](../reference/api/pandas.D... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
51c227b9-d23b-573f-bbae-76b0ea587c42 | changelog | pandas | pandas_whatsnew | 0.23.0 | 39 | * [`Timestamp.month_name()`](../reference/api/pandas.Timestamp.month_name.html#pandas.Timestamp.month_name "pandas.Timestamp.month_name"), [`DatetimeIndex.month_name()`](../reference/api/pandas.DatetimeIndex.month_name.html#pandas.DatetimeIndex.month_name "pandas.DatetimeIndex.month_name"), and [`Series.dt.month_name()... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
87f2da17-a22e-58c0-a20b-12ad69095027 | changelog | pandas | pandas_whatsnew | 0.23.0 | 40 | * [`DataFrame.to_sql()`](../reference/api/pandas.DataFrame.to_sql.html#pandas.DataFrame.to_sql "pandas.DataFrame.to_sql") now performs a multi-value insert if the underlying connection supports itk rather than inserting row by row.
`SQLAlchemy` dialects supporting multi-value inserts include: `mysql`, `postgresql`, `... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
b310662f-97f3-5477-b145-80b424f09170 | changelog | pandas | pandas_whatsnew | 0.23.0 | 41 | * [`Rolling.quantile()`](../reference/api/pandas.core.window.rolling.Rolling.quantile.html#pandas.core.window.rolling.Rolling.quantile "pandas.core.window.rolling.Rolling.quantile") and [`Expanding.quantile()`](../reference/api/pandas.core.window.expanding.Expanding.quantile.html#pandas.core.window.expanding.Expanding.... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
e517509c-8e58-515e-84e2-aaa263bb0c50 | changelog | pandas | pandas_whatsnew | 0.23.0 | 42 | * zip compression is supported via `compression=zip` in [`DataFrame.to_pickle()`](../reference/api/pandas.DataFrame.to_pickle.html#pandas.DataFrame.to_pickle "pandas.DataFrame.to_pickle"), [`Series.to_pickle()`](../reference/api/pandas.Series.to_pickle.html#pandas.Series.to_pickle "pandas.Series.to_pickle"), [`DataFram... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
db6c38f4-4273-5c43-847d-733025a29d5d | changelog | pandas | pandas_whatsnew | 0.23.0 | 43 | * [`WeekOfMonth`](../reference/api/pandas.tseries.offsets.WeekOfMonth.html#pandas.tseries.offsets.WeekOfMonth "pandas.tseries.offsets.WeekOfMonth") constructor now supports `n=0` ([GH 20517](https://github.com/pandas-dev/pandas/issues/20517)).
* [`DataFrame`](../reference/api/pandas.DataFrame.html#pandas.DataFrame "pan... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
f4570c21-f3ad-5e6a-8129-1608633bca77 | changelog | pandas | pandas_whatsnew | 0.23.0 | 44 | * Added new writer for exporting Stata dta files in version 117, `StataWriter117`. This format supports exporting strings with lengths up to 2,000,000 characters ([GH 16450](https://github.com/pandas-dev/pandas/issues/16450))
* `to_hdf()` and [`read_hdf()`](../reference/api/pandas.read_hdf.html#pandas.read_hdf "pandas.... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
5d11b994-e543-516f-b415-8e4f4ee8575b | changelog | pandas | pandas_whatsnew | 0.23.0 | 45 | * [`date_range()`](../reference/api/pandas.date_range.html#pandas.date_range "pandas.date_range"), [`timedelta_range()`](../reference/api/pandas.timedelta_range.html#pandas.timedelta_range "pandas.timedelta_range"), and [`interval_range()`](../reference/api/pandas.interval_range.html#pandas.interval_range "pandas.inter... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
228f5119-7271-5166-903c-38f9eb0d9675 | changelog | pandas | pandas_whatsnew | 0.23.0 | 46 | | Package | Minimum Version | Required | Issue |
| --- | --- | --- | --- |
| python-dateutil | 2.5.0 | X | [GH 15184](https://github.com/pandas-dev/pandas/issues/15184) |
| openpyxl | 2.4.0 | | [GH 15184](https://github.com/pandas-dev/pandas/issues/15184) |
| beautifulsoup4 | 4.2.1 | | [GH 20082](https://github.com/p... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
97d53f73-91f8-52ae-93b3-41b5095e15ac | changelog | pandas | pandas_whatsnew | 0.23.0 | 47 | higher. ([GH 19884](https://github.com/pandas-dev/pandas/issues/19884))
Previous behavior (and current behavior if on Python < 3.6):
```None
In [16]: pd.Series({'Income': 2000,
....: 'Expenses': -1500,
....: 'Taxes': -200,
....: 'Net result': 300})
Out[16]:
Expenses -1500... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
f6c0b6b5-9e02-5a9b-bfde-57e8e56dfd3a | changelog | pandas | pandas_whatsnew | 0.23.0 | 48 | If you wish to retain the old behavior while using Python >= 3.6, you can use
`.sort_index()`:
```None
In [73]: pd.Series({'Income': 2000,
....: 'Expenses': -1500,
....: 'Taxes': -200,
....: 'Net result': 300}).sort_index()
....:
Out[73]:
Expenses -1500
Income ... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
f514ea4e-4ed1-53a3-be81-5d9c21d31366 | changelog | pandas | pandas_whatsnew | 0.23.0 | 49 | In [76]: p = tm.makePanel()
In [77]: p
Out[77]:
<class 'pandas.core.panel.Panel'>
Dimensions: 3 (items) x 3 (major_axis) x 4 (minor_axis)
Items axis: ItemA to ItemC
Major_axis axis: 2000-01-03 00:00:00 to 2000-01-05 00:00:00
Minor_axis axis: A to D
```
Convert to a MultiIndex DataFrame
```None
In [78]: p.to_frame()
... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
ae612211-0bba-527a-9e60-2e0339b09ec6 | changelog | pandas | pandas_whatsnew | 0.23.0 | 50 | In [79]: p.to_xarray()
Out[79]:
<xarray.DataArray (items: 3, major_axis: 3, minor_axis: 4)>
array([[[ 0.469112, -1.135632, 0.119209, -2.104569],
[-0.282863, 1.212112, -1.044236, -0.494929],
[-1.509059, -0.173215, -0.861849, 1.071804]],
[[ 0.721555, 0.27186 , 0.276232, 0.113648],
[-... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
069c681c-932f-5b3d-b2cb-b57e6a96ac6c | changelog | pandas | pandas_whatsnew | 0.23.0 | 51 | The following error & warning messages are removed from `pandas.core.common` ([GH 13634](https://github.com/pandas-dev/pandas/issues/13634), [GH 19769](https://github.com/pandas-dev/pandas/issues/19769)):
* `PerformanceWarning`
* `UnsupportedFunctionCall`
* `UnsortedIndexError`
* `AbstractMethodError`
These are avail... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
e53084c2-4993-5cff-9dcc-f1ca496e5269 | changelog | pandas | pandas_whatsnew | 0.23.0 | 52 | where a list-like (e.g. `tuple` or `list` is returned) ([GH 16353](https://github.com/pandas-dev/pandas/issues/16353), [GH 17437](https://github.com/pandas-dev/pandas/issues/17437), [GH 17970](https://github.com/pandas-dev/pandas/issues/17970), [GH 17348](https://github.com/pandas-dev/pandas/issues/17348), [GH 17892](h... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
e4c67c5d-3310-52fe-9b9f-0e94e159245c | changelog | pandas | pandas_whatsnew | 0.23.0 | 53 | Previous behavior: if the returned shape happened to match the length of original columns, this would return a `DataFrame`.
If the return shape did not match, a `Series` with lists was returned.
```None
In [3]: df.apply(lambda x: [1, 2, 3], axis=1)
Out[3]:
A B C
0 1 2 3
1 1 2 3
2 1 2 3
3 1 2 3
4 1 2... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
fb00177d-d1a6-54e8-a3fb-c2fd030980fa | changelog | pandas | pandas_whatsnew | 0.23.0 | 54 | In [78]: df.apply(lambda x: [1, 2, 3], axis=1, result_type='expand')
Out[78]:
0 1 2
0 1 2 3
1 1 2 3
2 1 2 3
3 1 2 3
4 1 2 3
5 1 2 3
[6 rows x 3 columns]
```
To broadcast the result across the original columns (the old behaviour for
list-likes of the correct length), you can use `result_type='b... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
e658520b-843c-5251-bcce-ebc3d5ee358e | changelog | pandas | pandas_whatsnew | 0.23.0 | 55 | ### Concatenation will no longer sort[#](#concatenation-will-no-longer-sort "Link to this heading")
In a future version of pandas [`pandas.concat()`](../reference/api/pandas.concat.html#pandas.concat "pandas.concat") will no longer sort the non-concatenation axis when it is not already aligned.
The current behavior is... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
5aa281ca-6f7d-5cdc-8892-8577c6b726b2 | changelog | pandas | pandas_whatsnew | 0.23.0 | 56 | To accept the future behavior (no sorting), pass `sort=False`
Note that this change also applies to `DataFrame.append()`, which has also received a `sort` keyword for controlling this behavior.
### Build changes[#](#build-changes "Link to this heading")
* Building pandas for development now requires `cython >= 0.24`... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
058eb1d4-ebcf-5908-84b3-88e0001a5991 | changelog | pandas | pandas_whatsnew | 0.23.0 | 57 | Division operations on `Index` and subclasses will now fill division of positive numbers by zero with `np.inf`, division of negative numbers by zero with `-np.inf` and `0 / 0` with `np.nan`. This matches existing `Series` behavior. ([GH 19322](https://github.com/pandas-dev/pandas/issues/19322), [GH 19347](https://githu... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
8c6eccfc-0963-55a5-868c-d8ecef740d9a | changelog | pandas | pandas_whatsnew | 0.23.0 | 58 | # +infinity where positive, and NaN for 0 / 0
In [13]: index / 0
# The result of division by zero should not depend on
# whether the zero is int or float
In [14]: index / 0.0
In [15]: index = pd.UInt64Index([0, 1])
In [16]: index / np.array([0, 0], dtype=np.uint64)
In [17]: pd.RangeIndex(1, 5) / 0
```
### Extractio... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
1d1a4e66-7d98-555f-8e27-9c58c59aa1d7 | changelog | pandas | pandas_whatsnew | 0.23.0 | 59 | In [2]: extracted = s.str.extract(r'.*(\d\d).*')
In [3]: extracted
Out [3]:
0 10
1 12
dtype: object
In [4]: type(extracted)
Out [4]:
pandas.core.series.Series
```
New behavior:
```None
In [85]: s = pd.Series(['number 10', '12 eggs'])
In [86]: extracted = s.str.extract(r'.*(\d\d).*')
In [87]: extracted
Out[8... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
11d33797-84b4-506e-ade3-66ea45d55b91 | changelog | pandas | pandas_whatsnew | 0.23.0 | 60 | The default value of the `ordered` parameter for `CategoricalDtype` has changed from `False` to `None` to allow updating of `categories` without impacting `ordered`. Behavior should remain consistent for downstream objects, such as [`Categorical`](../reference/api/pandas.Categorical.html#pandas.Categorical "pandas.Cate... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
2068a075-98ed-58cd-bb49-1fd0104dd945 | changelog | pandas | pandas_whatsnew | 0.23.0 | 61 | Categories (3, object): [c < b < a]
In [5]: cdt = CategoricalDtype(categories=list('cbad'))
In [6]: cat.astype(cdt)
Out[6]:
[a, b, c, a, b, a]
Categories (4, object): [c < b < a < d]
```
Notice in the example above that the converted `Categorical` has retained `ordered=True`. Had the default value for `ordered` rema... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
ffe78291-e17e-5f20-8941-11550da7054d | changelog | pandas | pandas_whatsnew | 0.23.0 | 62 | ### Better pretty-printing of DataFrames in a terminal[#](#better-pretty-printing-of-dataframes-in-a-terminal "Link to this heading")
Previously, the default value for the maximum number of columns was
`pd.options.display.max_columns=20`. This meant that relatively wide data
frames would not fit within the terminal wi... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
67bad1e2-a599-5867-bea4-b6ac664b329f | changelog | pandas | pandas_whatsnew | 0.23.0 | 63 | set to `20` as in previous versions. In a terminal, this results in a much
nicer output:

Note that if you don’t like the new default, you can always set this option
yourself. To revert to the old setting, you can run this line:
```None
pd.options.display.ma... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
19e104a9-72b0-52cd-a609-27810d279d06 | changelog | pandas | pandas_whatsnew | 0.23.0 | 64 | * Addition or subtraction of `NaT` from [`TimedeltaIndex`](../reference/api/pandas.TimedeltaIndex.html#pandas.TimedeltaIndex "pandas.TimedeltaIndex") will return `TimedeltaIndex` instead of `DatetimeIndex` ([GH 19124](https://github.com/pandas-dev/pandas/issues/19124))
* `DatetimeIndex.shift()` and `TimedeltaIndex.shif... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
2e138d87-8d7d-5d8d-97d2-ba874bdbabd9 | changelog | pandas | pandas_whatsnew | 0.23.0 | 65 | * `NaT` division with [`datetime.timedelta`](https://docs.python.org/3/library/datetime.html#datetime.timedelta "(in Python v3.13)") will now return `NaN` instead of raising ([GH 17876](https://github.com/pandas-dev/pandas/issues/17876))
* Operations between a [`Series`](../reference/api/pandas.Series.html#pandas.Serie... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
6e3b4178-4ffb-5c7e-ab1f-443f55ac543b | changelog | pandas | pandas_whatsnew | 0.23.0 | 66 | * [`Timestamp`](../reference/api/pandas.Timestamp.html#pandas.Timestamp "pandas.Timestamp") will no longer silently ignore unused or invalid `tz` or `tzinfo` keyword arguments ([GH 17690](https://github.com/pandas-dev/pandas/issues/17690))
* [`Timestamp`](../reference/api/pandas.Timestamp.html#pandas.Timestamp "pandas.... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
142474a1-130c-53e6-a556-6208b3cc9051 | changelog | pandas | pandas_whatsnew | 0.23.0 | 67 | * [`Series.truncate()`](../reference/api/pandas.Series.truncate.html#pandas.Series.truncate "pandas.Series.truncate") and [`DataFrame.truncate()`](../reference/api/pandas.DataFrame.truncate.html#pandas.DataFrame.truncate "pandas.DataFrame.truncate") will raise a `ValueError` if the index is not sorted instead of an unh... | large_dataset/raw/changelog/pandas_whatsnew/whatsnew_0.23.0.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.