<commit_before>.. _whatsnew_0100:

.. ipython:: python
   :suppress:

   from pandas.compat import StringIO

v0.10.0 (December 17, 2012)
---------------------------

This is a major release from 0.9.1 and includes many new features and
enhancements along with a large number of bug fixes. There are also a number of
important API changes that long-time pandas users should pay close attention
to.

File parsing new features
~~~~~~~~~~~~~~~~~~~~~~~~~

The delimited file parsing engine (the guts of ``read_csv`` and ``read_table``)
has been rewritten from the ground up and now uses a fraction the amount of
memory while parsing, while being 40% or more faster in most use cases (in some
cases much faster).

There are also many new features:

- Much-improved Unicode handling via the ``encoding`` option.
- Column filtering (``usecols``)
- Dtype specification (``dtype`` argument)
- Ability to specify strings to be recognized as True/False
- Ability to yield NumPy record arrays (``as_recarray``)
- High performance ``delim_whitespace`` option
- Decimal format (e.g. European format) specification
- Easier CSV dialect options: ``escapechar``, ``lineterminator``,
  ``quotechar``, etc.
- More robust handling of many exceptional kinds of files observed in the wild

API changes
~~~~~~~~~~~

**Deprecated DataFrame BINOP TimeSeries special case behavior**

The default behavior of binary operations between a DataFrame and a Series has
always been to align on the DataFrame's columns and broadcast down the rows,
**except** in the special case that the DataFrame contains time series. Since
there are now method for each binary operator enabling you to specify how you
want to broadcast, we are phasing out this special case (Zen of Python:
*Special cases aren't special enough to break the rules*). Here's what I'm
talking about:

.. ipython:: python
   :okwarning:

   import pandas as pd
   df = pd.DataFrame(np.random.randn(6, 4),
                     index=pd.date_range('1/1/2000', periods=6))
   df
   # deprecated now
   df - df[0]
   # Change your code to
   df.sub(df[0], axis=0) # align on axis 0 (rows)

You will get a deprecation warning in the 0.10.x series, and the deprecated
functionality will be removed in 0.11 or later.

**Altered resample default behavior**

The default time series ``resample`` binning behavior of daily ``D`` and
*higher* frequencies has been changed to ``closed='left', label='left'``. Lower
nfrequencies are unaffected. The prior defaults were causing a great deal of
confusion for users, especially resampling data to daily frequency (which
labeled the aggregated group with the end of the interval: the next day).

Note:

.. ipython:: python

    dates = pd.date_range('1/1/2000', '1/5/2000', freq='4h')
    series = Series(np.arange(len(dates)), index=dates)
    series
    series.resample('D', how='sum')
    # old behavior
    series.resample('D', how='sum', closed='right', label='right')

- Infinity and negative infinity are no longer treated as NA by ``isnull`` and
  ``notnull``. That they every were was a relic of early pandas. This behavior
  can be re-enabled globally by the ``mode.use_inf_as_null`` option:
<commit_msg>DOC: typo in v0.10 whatsnew<commit_after>.. _whatsnew_0100:

.. ipython:: python
   :suppress:

   from pandas.compat import StringIO

v0.10.0 (December 17, 2012)
---------------------------

This is a major release from 0.9.1 and includes many new features and
enhancements along with a large number of bug fixes. There are also a number of
important API changes that long-time pandas users should pay close attention
to.

File parsing new features
~~~~~~~~~~~~~~~~~~~~~~~~~

The delimited file parsing engine (the guts of ``read_csv`` and ``read_table``)
has been rewritten from the ground up and now uses a fraction the amount of
memory while parsing, while being 40% or more faster in most use cases (in some
cases much faster).

There are also many new features:

- Much-improved Unicode handling via the ``encoding`` option.
- Column filtering (``usecols``)
- Dtype specification (``dtype`` argument)
- Ability to specify strings to be recognized as True/False
- Ability to yield NumPy record arrays (``as_recarray``)
- High performance ``delim_whitespace`` option
- Decimal format (e.g. European format) specification
- Easier CSV dialect options: ``escapechar``, ``lineterminator``,
  ``quotechar``, etc.
- More robust handling of many exceptional kinds of files observed in the wild

API changes
~~~~~~~~~~~

**Deprecated DataFrame BINOP TimeSeries special case behavior**

The default behavior of binary operations between a DataFrame and a Series has
always been to align on the DataFrame's columns and broadcast down the rows,
**except** in the special case that the DataFrame contains time series. Since
there are now method for each binary operator enabling you to specify how you
want to broadcast, we are phasing out this special case (Zen of Python:
*Special cases aren't special enough to break the rules*). Here's what I'm
talking about:

.. ipython:: python
   :okwarning:

   import pandas as pd
   df = pd.DataFrame(np.random.randn(6, 4),
                     index=pd.date_range('1/1/2000', periods=6))
   df
   # deprecated now
   df - df[0]
   # Change your code to
   df.sub(df[0], axis=0) # align on axis 0 (rows)

You will get a deprecation warning in the 0.10.x series, and the deprecated
functionality will be removed in 0.11 or later.

**Altered resample default behavior**

The default time series ``resample`` binning behavior of daily ``D`` and
*higher* frequencies has been changed to ``closed='left', label='left'``. Lower
nfrequencies are unaffected. The prior defaults were causing a great deal of
confusion for users, especially resampling data to daily frequency (which
labeled the aggregated group with the end of the interval: the next day).

Note:

.. ipython:: python

    dates = pd.date_range('1/1/2000', '1/5/2000', freq='4h')
    series = Series(np.arange(len(dates)), index=dates)
    series
    series.resample('D', how='sum')
    # old behavior
    series.resample('D', how='sum', closed='right', label='right')

- Infinity and negative infinity are no longer treated as NA by ``isnull`` and
  ``notnull``. That they ever were was a relic of early pandas. This behavior
  can be re-enabled globally by the ``mode.use_inf_as_null`` option:

{'fraction_non_alphanumeric': 0.10648657138369719, 'fraction_numerical': 0.016491283178891158, 'mean_word_length': 4.022082018927445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2466616', 'n_tokens_mistral': 1884, 'n_tokens_neox': 1744, 'n_words': 838}