Skip to content

Commit e6c4f76

Browse files
committed
Merge pull request pandas-dev#9986 from mortada/doc_cleanup
DOC/CLN: HTML docs fixes
2 parents 78167e1 + b1b1027 commit e6c4f76

File tree

3 files changed

+21
-22
lines changed

3 files changed

+21
-22
lines changed

doc/source/enhancingperf.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Here's the function in pure python:
6666
s += f(a + i * dx)
6767
return s * dx
6868
69-
We achieve our result by by using ``apply`` (row-wise):
69+
We achieve our result by using ``apply`` (row-wise):
7070

7171
.. ipython:: python
7272
@@ -86,7 +86,7 @@ hence we'll concentrate our efforts cythonizing these two functions.
8686
.. note::
8787

8888
In python 2 replacing the ``range`` with its generator counterpart (``xrange``)
89-
would mean the ``range`` line would vanish. In python 3 range is already a generator.
89+
would mean the ``range`` line would vanish. In python 3 ``range`` is already a generator.
9090

9191
.. _enhancingperf.plain:
9292

@@ -248,7 +248,7 @@ efforts here.
248248
More advanced techniques
249249
~~~~~~~~~~~~~~~~~~~~~~~~
250250

251-
There is still scope for improvement, here's an example of using some more
251+
There is still hope for improvement. Here's an example of using some more
252252
advanced cython techniques:
253253

254254
.. ipython::
@@ -373,7 +373,7 @@ This Python syntax is **not** allowed:
373373
:func:`~pandas.eval` Examples
374374
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
375375

376-
:func:`pandas.eval` works well with expressions containing large arrays
376+
:func:`pandas.eval` works well with expressions containing large arrays.
377377

378378
First let's create a few decent-sized arrays to play with:
379379

doc/source/remote_data.rst

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Yahoo! Finance
4949
import datetime
5050
start = datetime.datetime(2010, 1, 1)
5151
end = datetime.datetime(2013, 1, 27)
52-
f=web.DataReader("F", 'yahoo', start, end)
52+
f = web.DataReader("F", 'yahoo', start, end)
5353
f.ix['2010-01-04']
5454
5555
.. _remote_data.yahoo_options:
@@ -58,10 +58,10 @@ Yahoo! Finance Options
5858
----------------------
5959
***Experimental***
6060

61-
The Options class allows the download of options data from Yahoo! Finance.
61+
The ``Options`` class allows the download of options data from Yahoo! Finance.
6262

6363
The ``get_all_data`` method downloads and caches option data for all expiry months
64-
and provides a formatted ``DataFrame`` with a hierarchical index, so its easy to get
64+
and provides a formatted ``DataFrame`` with a hierarchical index, so it is easy to get
6565
to the specific option you want.
6666

6767
.. ipython:: python
@@ -71,10 +71,10 @@ to the specific option you want.
7171
data = aapl.get_all_data()
7272
data.iloc[0:5, 0:5]
7373
74-
#Show the $100 strike puts at all expiry dates:
74+
# Show the $100 strike puts at all expiry dates:
7575
data.loc[(100, slice(None), 'put'),:].iloc[0:5, 0:5]
7676
77-
#Show the volume traded of $100 strike puts at all expiry dates:
77+
# Show the volume traded of $100 strike puts at all expiry dates:
7878
data.loc[(100, slice(None), 'put'),'Vol'].head()
7979
8080
If you don't want to download all the data, more specific requests can be made.
@@ -121,7 +121,7 @@ Google Finance
121121
import datetime
122122
start = datetime.datetime(2010, 1, 1)
123123
end = datetime.datetime(2013, 1, 27)
124-
f=web.DataReader("F", 'google', start, end)
124+
f = web.DataReader("F", 'google', start, end)
125125
f.ix['2010-01-04']
126126
127127
.. _remote_data.fred:
@@ -152,7 +152,7 @@ Dataset names are listed at `Fama/French Data Library
152152
.. ipython:: python
153153
154154
import pandas.io.data as web
155-
ip=web.DataReader("5_Industry_Portfolios", "famafrench")
155+
ip = web.DataReader("5_Industry_Portfolios", "famafrench")
156156
ip[4].ix[192607]
157157
158158
.. _remote_data.wb:
@@ -302,9 +302,8 @@ Problematic Country Codes & Indicators
302302
:func:`wb.download()` is more flexible. To achieve this, the warning
303303
and exception logic changed.
304304
305-
The world bank converts some country codes,
306-
in their response, which makes error checking by pandas difficult.
307-
Retired indicators still persist in the search.
305+
The world bank converts some country codes in their response, which makes error
306+
checking by pandas difficult. Retired indicators still persist in the search.
308307
309308
Given the new flexibility of 0.15.1, improved error handling by the user
310309
may be necessary for fringe cases.
@@ -377,13 +376,13 @@ The following will fetch users and pageviews (metrics) data per day of the week,
377376
filters = "pagePath=~aboutus;ga:country==France",
378377
)
379378
380-
The only mandatory arguments are ``metrics,`` ``dimensions`` and ``start_date``. We can only strongly recommend you to always specify the ``account_id``, ``profile_id`` and ``property_id`` to avoid accessing the wrong data bucket in Google Analytics.
379+
The only mandatory arguments are ``metrics,`` ``dimensions`` and ``start_date``. We strongly recommend that you always specify the ``account_id``, ``profile_id`` and ``property_id`` to avoid accessing the wrong data bucket in Google Analytics.
381380
382381
The ``index_col`` argument indicates which dimension(s) has to be taken as index.
383382
384-
The ``filters`` argument indicates the filtering to apply to the query. In the above example, the page has URL has to contain ``aboutus`` AND the visitors country has to be France.
383+
The ``filters`` argument indicates the filtering to apply to the query. In the above example, the page URL has to contain ``aboutus`` AND the visitors country has to be France.
385384
386-
Detailed informations in the followings:
385+
Detailed information in the following:
387386
388387
* `pandas & google analytics, by yhat <http://blog.yhathq.com/posts/pandas-google-analytics.html>`__
389388
* `Google Analytics integration in pandas, by Chang She <http://quantabee.wordpress.com/2012/12/17/google-analytics-pandas/>`__

doc/source/timedeltas.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ Time Deltas
2929
Starting in v0.15.0, we introduce a new scalar type ``Timedelta``, which is a subclass of ``datetime.timedelta``, and behaves in a similar manner,
3030
but allows compatibility with ``np.timedelta64`` types as well as a host of custom representation, parsing, and attributes.
3131

32-
Timedeltas are differences in times, expressed in difference units, e.g. days,hours,minutes,seconds.
32+
Timedeltas are differences in times, expressed in difference units, e.g. days, hours, minutes, seconds.
3333
They can be both positive and negative.
3434

3535
Parsing
3636
-------
3737

38-
You can construct a ``Timedelta`` scalar thru various arguments:
38+
You can construct a ``Timedelta`` scalar through various arguments:
3939

4040
.. ipython:: python
4141
@@ -46,7 +46,7 @@ You can construct a ``Timedelta`` scalar thru various arguments:
4646
Timedelta('-1 days 2 min 3us')
4747
4848
# like datetime.timedelta
49-
# note: these MUST be specified as keyword argments
49+
# note: these MUST be specified as keyword arguments
5050
Timedelta(days=1,seconds=1)
5151
5252
# integers with a unit
@@ -100,7 +100,7 @@ It will construct Series if the input is a Series, a scalar if the input is scal
100100
Operations
101101
----------
102102

103-
You can operate on Series/DataFrames and construct ``timedelta64[ns]`` Series thru
103+
You can operate on Series/DataFrames and construct ``timedelta64[ns]`` Series through
104104
subtraction operations on ``datetime64[ns]`` Series, or ``Timestamps``.
105105

106106
.. ipython:: python
@@ -290,7 +290,7 @@ TimedeltaIndex
290290

291291
.. versionadded:: 0.15.0
292292

293-
To generate an index with time delta, you can use either the TimedeltaIndex or
293+
To generate an index with time delta, you can use either the ``TimedeltaIndex`` or
294294
the ``timedelta_range`` constructor.
295295

296296
Using ``TimedeltaIndex`` you can pass string-like, ``Timedelta``, ``timedelta``,

0 commit comments

Comments
 (0)