Skip to content

Commit 19c8874

Browse files
committed
DOC: revised code-blocks in remote_data.rst
1 parent 149b922 commit 19c8874

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/source/remote_data.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ by using the ``wb`` I/O functions.
107107
For example, if you wanted to compare the Gross Domestic Products per capita in
108108
constant dollars in North America, you would use the ``search`` function:
109109

110-
.. code:: python
110+
.. code-block:: python
111111
112112
In [1]: from pandas.io import wb
113113
@@ -122,7 +122,7 @@ constant dollars in North America, you would use the ``search`` function:
122122
Then you would use the ``download`` function to acquire the data from the World
123123
Bank's servers:
124124
125-
.. code:: python
125+
.. code-block:: python
126126
127127
In [3]: dat = wb.download(indicator='NY.GDP.PCAP.KD', country=['US', 'CA', 'MX'], start=2005, end=2008)
128128
@@ -145,7 +145,7 @@ Bank's servers:
145145
The resulting dataset is a properly formatted ``DataFrame`` with a hierarchical
146146
index, so it is easy to apply ``.groupby`` transformations to it:
147147
148-
.. code:: python
148+
.. code-block:: python
149149
150150
In [6]: dat['NY.GDP.PCAP.KD'].groupby(level=0).mean()
151151
Out[6]:
@@ -158,7 +158,7 @@ index, so it is easy to apply ``.groupby`` transformations to it:
158158
Now imagine you want to compare GDP to the share of people with cellphone
159159
contracts around the world.
160160
161-
.. code:: python
161+
.. code-block:: python
162162
163163
In [7]: wb.search('cell.*%').iloc[:,:2]
164164
Out[7]:
@@ -170,7 +170,7 @@ contracts around the world.
170170
Notice that this second search was much faster than the first one because
171171
``Pandas`` now has a cached list of available data series.
172172
173-
.. code:: python
173+
.. code-block:: python
174174
175175
In [13]: ind = ['NY.GDP.PCAP.KD', 'IT.MOB.COV.ZS']
176176
In [14]: dat = wb.download(indicator=ind, country='all', start=2011, end=2011).dropna()
@@ -188,7 +188,7 @@ Finally, we use the ``statsmodels`` package to assess the relationship between
188188
our two variables using ordinary least squares regression. Unsurprisingly,
189189
populations in rich countries tend to use cellphones at a higher rate:
190190
191-
.. code:: python
191+
.. code-block:: python
192192
193193
In [17]: import numpy as np
194194
In [18]: import statsmodels.formula.api as smf

0 commit comments

Comments
 (0)