Skip to content

DOC: FIx flake8 errors for whatsnew v0.7.* -v0.9.* rst #24273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 14, 2018
17 changes: 6 additions & 11 deletions doc/source/whatsnew/v0.7.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ v.0.7.0 (February 9, 2012)

{{ header }}

.. ipython:: python
:suppress:

from pandas import * # noqa F401, F403


New features
~~~~~~~~~~~~
Expand Down Expand Up @@ -38,7 +33,7 @@ New features

.. ipython:: python

df = DataFrame(randn(10, 4))
df = pd.DataFrame(np.random.randn(10, 4))
df.apply(lambda x: x.describe())

- :ref:`Add<advanced.reorderlevels>` ``reorder_levels`` method to Series and
Expand Down Expand Up @@ -123,7 +118,7 @@ regard to label-based indexing. Here is an example:

.. ipython:: python

s = Series(randn(10), index=range(0, 20, 2))
s = pd.Series(np.random.randn(10), index=range(0, 20, 2))
s
s[0]
s[2]
Expand All @@ -142,7 +137,7 @@ This change also has the same impact on DataFrame:

.. code-block:: ipython

In [3]: df = DataFrame(randn(8, 4), index=range(0, 16, 2))
In [3]: df = pd.DataFrame(np.random.randn(8, 4), index=range(0, 16, 2))

In [4]: df
0 1 2 3
Expand Down Expand Up @@ -179,7 +174,7 @@ Label-based slicing using ``ix`` now requires that the index be sorted

.. code-block:: python

In [1]: s = Series(randn(6), index=list('gmkaec'))
In [1]: s = pd.Series(np.random.randn(6), index=list('gmkaec'))

In [2]: s
Out[2]:
Expand Down Expand Up @@ -242,7 +237,7 @@ passing similar input to ``ix`` **except in the case of integer indexing**:

.. ipython:: python

s = Series(randn(6), index=list('acegkm'))
s = pd.Series(np.random.randn(6), index=list('acegkm'))
s
s[['m', 'a', 'c', 'e']]
s['b':'l']
Expand All @@ -253,7 +248,7 @@ In the case of integer indexes, the behavior will be exactly as before

.. ipython:: python

s = Series(randn(6), index=range(0, 12, 2))
s = pd.Series(np.random.randn(6), index=range(0, 12, 2))
s[[4, 0, 2]]
s[1:5]

Expand Down
5 changes: 0 additions & 5 deletions doc/source/whatsnew/v0.7.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ v.0.7.1 (February 29, 2012)

{{ header }}

.. ipython:: python
:suppress:

from pandas import * # noqa F401, F403


This release includes a few new features and addresses over a dozen bugs in
0.7.0.
Expand Down
5 changes: 0 additions & 5 deletions doc/source/whatsnew/v0.7.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ v.0.7.2 (March 16, 2012)

{{ header }}

.. ipython:: python
:suppress:

from pandas import * # noqa F401, F403


This release targets bugs in 0.7.1, and adds a few minor features.

Expand Down
25 changes: 10 additions & 15 deletions doc/source/whatsnew/v0.7.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ v.0.7.3 (April 12, 2012)

{{ header }}

.. ipython:: python
:suppress:

from pandas import * # noqa F401, F403


This is a minor release from 0.7.2 and fixes many minor bugs and adds a number
of nice new features. There are also a couple of API changes to note; these
Expand All @@ -28,7 +23,7 @@ New features
.. code-block:: python

from pandas.tools.plotting import scatter_matrix
scatter_matrix(df, alpha=0.2)
scatter_matrix(df, alpha=0.2) # noqa F821

.. image:: ../savefig/scatter_matrix_kde.png
:width: 5in
Expand All @@ -38,14 +33,14 @@ New features

.. code-block:: python

df.plot(kind='bar', stacked=True)
df.plot(kind='bar', stacked=True) # noqa F821

.. image:: ../savefig/bar_plot_stacked_ex.png
:width: 4in

.. code-block:: python

df.plot(kind='barh', stacked=True)
df.plot(kind='barh', stacked=True) # noqa F821

.. image:: ../savefig/barh_plot_stacked_ex.png
:width: 4in
Expand All @@ -63,7 +58,7 @@ Reverted some changes to how NA values (represented typically as ``NaN`` or

.. ipython:: python

series = Series(['Steve', np.nan, 'Joe'])
series = pd.Series(['Steve', np.nan, 'Joe'])
series == 'Steve'
series != 'Steve'

Expand Down Expand Up @@ -93,15 +88,15 @@ Series, to be more consistent with the ``groupby`` behavior with DataFrame:
.. ipython:: python
:okwarning:

df = DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
'foo', 'bar', 'foo', 'foo'],
'B' : ['one', 'one', 'two', 'three',
'two', 'two', 'one', 'three'],
'C' : np.random.randn(8), 'D' : np.random.randn(8)})
df = pd.DataFrame({'A': ['foo', 'bar', 'foo', 'bar',
'foo', 'bar', 'foo', 'foo'],
'B': ['one', 'one', 'two', 'three',
'two', 'two', 'one', 'three'],
'C': np.random.randn(8), 'D': np.random.randn(8)})
df
grouped = df.groupby('A')['C']
grouped.describe()
grouped.apply(lambda x: x.sort_values()[-2:]) # top 2 values
grouped.apply(lambda x: x.sort_values()[-2:]) # top 2 values


.. _whatsnew_0.7.3.contributors:
Expand Down
13 changes: 4 additions & 9 deletions doc/source/whatsnew/v0.8.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ v0.8.0 (June 29, 2012)

{{ header }}

.. ipython:: python
:suppress:

from pandas import * # noqa F401, F403


This is a major release from 0.7.3 and includes extensive work on the time
series handling and processing infrastructure as well as a great deal of new
Expand Down Expand Up @@ -183,8 +178,8 @@ types. For example, ``'kde'`` is a new option:

.. ipython:: python

s = Series(np.concatenate((np.random.randn(1000),
np.random.randn(1000) * 0.5 + 3)))
s = pd.Series(np.concatenate((np.random.randn(1000),
np.random.randn(1000) * 0.5 + 3)))
plt.figure()
s.hist(density=True, alpha=0.2)
s.plot(kind='kde')
Expand All @@ -211,7 +206,7 @@ with code using scalar values because you are handing control over to NumPy:
.. ipython:: python

import datetime
rng = date_range('1/1/2000', periods=10)
rng = pd.date_range('1/1/2000', periods=10)
rng[5]
isinstance(rng[5], datetime.datetime)
rng_asarray = np.asarray(rng)
Expand Down Expand Up @@ -257,7 +252,7 @@ type. See `matplotlib documentation

.. ipython:: python

rng = date_range('1/1/2000', periods=10)
rng = pd.date_range('1/1/2000', periods=10)
rng
np.asarray(rng)
converted = np.asarray(rng, dtype=object)
Expand Down
5 changes: 0 additions & 5 deletions doc/source/whatsnew/v0.8.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ v0.8.1 (July 22, 2012)

{{ header }}

.. ipython:: python
:suppress:

from pandas import * # noqa F401, F403


This release includes a few new features, performance enhancements, and over 30
bug fixes from 0.8.0. New features include notably NA friendly string
Expand Down
17 changes: 8 additions & 9 deletions doc/source/whatsnew/v0.9.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

{{ header }}

.. ipython:: python
:suppress:

from pandas import * # noqa F401, F403


v0.9.0 (October 7, 2012)
------------------------
Expand Down Expand Up @@ -44,8 +39,12 @@ API changes

.. ipython:: python

data = '0,0,1\n1,1,0\n0,1,0'
df = read_csv(StringIO(data), header=None)
import io

data = ('0,0,1\n'
'1,1,0\n'
'0,1,0')
df = pd.read_csv(io.StringIO(data), header=None)
df


Expand All @@ -57,10 +56,10 @@ API changes

.. ipython:: python

s1 = Series([1, 2, 3])
s1 = pd.Series([1, 2, 3])
s1

s2 = Series(s1, index=['foo', 'bar', 'baz'])
s2 = pd.Series(s1, index=['foo', 'bar', 'baz'])
s2

- Deprecated ``day_of_year`` API removed from PeriodIndex, use ``dayofyear``
Expand Down
25 changes: 12 additions & 13 deletions doc/source/whatsnew/v0.9.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ v0.9.1 (November 14, 2012)

{{ header }}

.. ipython:: python
:suppress:

from pandas import * # noqa F401, F403


This is a bug fix release from 0.9.0 and includes several new features and
enhancements along with a large number of bug fixes. The new features include
Expand All @@ -25,7 +20,8 @@ New features

.. code-block:: ipython

In [2]: df = DataFrame(np.random.randint(0, 2, (6, 3)), columns=['A', 'B', 'C'])
In [2]: df = pd.DataFrame(np.random.randint(0, 2, (6, 3)),
...: columns=['A', 'B', 'C'])

In [3]: df.sort(['A', 'B'], ascending=[1, 0])

Expand All @@ -44,7 +40,7 @@ New features

.. ipython:: python

df = DataFrame(np.random.randn(6, 3), columns=['A', 'B', 'C'])
df = pd.DataFrame(np.random.randn(6, 3), columns=['A', 'B', 'C'])

df.loc[2:4] = np.nan

Expand Down Expand Up @@ -101,7 +97,7 @@ New features

.. ipython:: python

xl = ExcelFile('data/test.xls')
xl = pd.ExcelFile('data/test.xls')
xl.parse('Sheet1', index_col=0, parse_dates=True,
parse_cols='A:D')

Expand All @@ -124,9 +120,9 @@ API changes

.. code-block:: ipython

In [1]: prng = period_range('2012Q1', periods=2, freq='Q')
In [1]: prng = pd.period_range('2012Q1', periods=2, freq='Q')

In [2]: s = Series(np.random.randn(len(prng)), prng)
In [2]: s = pd.Series(np.random.randn(len(prng)), prng)

In [4]: s.resample('M')
Out[4]:
Expand All @@ -143,7 +139,7 @@ API changes

.. ipython:: python

p = Period('2012')
p = pd.Period('2012')

p.end_time

Expand All @@ -153,9 +149,12 @@ API changes

.. ipython:: python

data = 'A,B,C\n00001,001,5\n00002,002,6'
import io

read_csv(StringIO(data), converters={'A' : lambda x: x.strip()})
data = ('A,B,C\n'
'00001,001,5\n'
'00002,002,6')
pd.read_csv(io.StringIO(data), converters={'A': lambda x: x.strip()})


See the :ref:`full release notes
Expand Down
7 changes: 0 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ ignore = E402, # module level import not at top of file
E703, # statement ends with a semicolon

exclude =
doc/source/whatsnew/v0.7.0.rst
doc/source/whatsnew/v0.7.3.rst
doc/source/whatsnew/v0.8.0.rst
doc/source/whatsnew/v0.9.0.rst
doc/source/whatsnew/v0.9.1.rst
doc/source/whatsnew/v0.12.0.rst
doc/source/whatsnew/v0.13.0.rst
doc/source/whatsnew/v0.13.1.rst
Expand All @@ -63,8 +58,6 @@ exclude =
doc/source/whatsnew/v0.17.1.rst
doc/source/whatsnew/v0.18.0.rst
doc/source/whatsnew/v0.18.1.rst
doc/source/whatsnew/v0.23.1.rst
doc/source/whatsnew/v0.23.2.rst
doc/source/basics.rst
doc/source/contributing_docstring.rst
doc/source/enhancingperf.rst
Expand Down