This is a minor bug-fix release from 0.15.0 and includes a small number of API changes, several new features,
enhancements, and performance improvements along with a large number of bug fixes. We recommend that all
users upgrade to this version.
In [15]: s.loc[3.5:1.5]Out[15]: 3 b2 cLength: 2, dtype: object
io.data.Options has been fixed for a change in the format of the Yahoo Options page (GH 8612), (GH 8741)
The month and year parameters have been undeprecated and can be used to get all
options data for a given month.
If an expiry date that is not valid is given, data for the next expiry after the given
date is returned.
Option data frames are now saved on the instance as callsYYMMDD or putsYYMMDD. Previously
they were saved as callsMMYY and putsMMYY. The next expiry is saved as calls and puts.
New features:
The expiry parameter can now be a single date or a list-like object containing dates.
A new property expiry_dates was added, which returns all available expiry dates.
Current behavior:
In [17]: frompandas.io.dataimportOptionsIn [18]: aapl=Options('aapl','yahoo')In [19]: aapl.get_call_data().iloc[0:5,0:1]Out[19]: LastStrike Expiry Type Symbol
pandas now also registers the datetime64 dtype in matplotlib’s units registry
to plot such values as datetimes. This is activated once pandas is imported. In
previous versions, plotting an array of datetime64 values will have resulted
in plotted integer values. To keep the previous behaviour, you can do
delmatplotlib.units.registry[np.datetime64] (GH 8614).
Enhancements
concat permits a wider variety of iterables of pandas objects to be
passed as the first parameter (GH 8645):
In [16]: fromcollectionsimportdequeIn [17]: df1=pd.DataFrame([1,2,3])In [18]: df2=pd.DataFrame([4,5,6])
previous behavior:
In [7]: pd.concat(deque((df1,df2)))TypeError: first argument must be a list-like of pandas objects, you passed an object of type "deque"
current behavior:
In [19]: pd.concat(deque((df1,df2)))Out[19]: 00 11 22 30 41 52 6[6 rows x 1 columns]
Represent MultiIndex labels with a dtype that utilizes memory based on the level size. In prior versions, the memory usage was a constant 8 bytes per element in each level. In addition, in prior versions, the reported memory usage was incorrect as it didn’t show the usage for the memory occupied by the underling data array. (GH 8456)
In [20]: dfi=pd.DataFrame( ....: 1,index=pd.MultiIndex.from_product([["a"],range(1000)]),columns
Added Index properties is_monotonic_increasing and is_monotonic_decreasing (GH 8680).
Added option to select columns when importing Stata files (GH 7935)
Qualify memory usage in DataFrame.info() by adding + if it is a lower bound (GH 8578)
Raise errors in certain aggregation cases where an argument such as numeric_only is not handled (GH 8592).
Added support for 3-character ISO and non-standard country codes in io.wb.download() (GH 8482)
World Bank data requests now will warn/raise based
on an errors argument, as well as a list of hard-coded country codes and
the World Bank’s JSON response. In prior versions, the error messages
didn’t look at the World Bank’s JSON response. Problem-inducing input were
simply dropped prior to the request. The issue was that many good countries
were cropped in the hard-coded approach. All countries will work now, but
some bad countries will raise exceptions because some edge cases break the
entire response. (GH 8482)
Added option to Series.str.split() to return a DataFrame rather than a Series (GH 8428)
Added option to df.info(null_counts=None|True|False) to override the default display options and force showing of the null-counts (GH 8701)
Bug fixes
Bug in unpickling of a CustomBusinessDay object (GH 8591)
Bug in coercing Categorical to a records array, e.g. df.to_records() (GH 8626)
Bug in Categorical not created properly with Series.to_frame() (GH 8626)
Bug in coercing in astype of a Categorical of a passed pd.Categorical (this now raises TypeError correctly), (GH 8626)
Bug in cut/qcut when using Series and retbins=True (GH 8589)
Bug in writing Categorical columns to an SQL database with to_sql (GH 8624).
Bug in comparing Categorical of datetime raising when being compared to a scalar datetime (GH 8687)
Bug in selecting from a Categorical with .iloc (GH 8623)
Bug in groupby-transform with a Categorical (GH 8623)
Bug in duplicated/drop_duplicates with a Categorical (GH 8623)
Bug in Categorical reflected comparison operator raising if the first argument was a numpy array scalar (e.g. np.int64) (GH 8658)