diff --git a/doc/source/api.rst b/doc/source/api.rst index 4dd055bce0a0a..2e913d8aae4da 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -819,7 +819,6 @@ Reshaping, sorting, transposing .. autosummary:: :toctree: generated/ - DataFrame.delevel DataFrame.pivot DataFrame.reorder_levels DataFrame.sort diff --git a/doc/source/index.rst.template b/doc/source/index.rst.template index ccedaaa0429f0..ee779715bcb95 100644 --- a/doc/source/index.rst.template +++ b/doc/source/index.rst.template @@ -135,7 +135,6 @@ See the package overview for more detail about what's in the library. timedeltas categorical visualization - rplot io remote_data enhancingperf diff --git a/doc/source/indexing.rst b/doc/source/indexing.rst index 7494f21b3ba71..00058a650258b 100644 --- a/doc/source/indexing.rst +++ b/doc/source/indexing.rst @@ -106,9 +106,8 @@ of multi-axis indexing. label based access and not positional access is supported. Thus, in such cases, it's usually better to be explicit and use ``.iloc`` or ``.loc``. - See more at :ref:`Advanced Indexing `, :ref:`Advanced - Hierarchical ` and :ref:`Fallback Indexing - ` + See more at :ref:`Advanced Indexing ` and :ref:`Advanced + Hierarchical `. Getting values from an object with multi-axes selection uses the following notation (using ``.loc`` as an example, but applies to ``.iloc`` and ``.ix`` as diff --git a/doc/source/missing_data.rst b/doc/source/missing_data.rst index 69afd861df325..4505d256d31f6 100644 --- a/doc/source/missing_data.rst +++ b/doc/source/missing_data.rst @@ -422,7 +422,7 @@ at the new values. ser = Series(np.sort(np.random.uniform(size=100))) # interpolate at new_index - new_index = ser.index + Index([49.25, 49.5, 49.75, 50.25, 50.5, 50.75]) + new_index = ser.index | Index([49.25, 49.5, 49.75, 50.25, 50.5, 50.75]) interp_s = ser.reindex(new_index).interpolate(method='pchip') interp_s[49:51] diff --git a/doc/source/visualization.rst b/doc/source/visualization.rst index 3285efadf8ad1..b0c979989411d 100644 --- a/doc/source/visualization.rst +++ b/doc/source/visualization.rst @@ -689,7 +689,7 @@ See the `matplotlib pie documenation >> df = pd.DataFrame([['a'], ['a'], ['a'], ['b'], ['b'], ['a']], ... columns=['A']) @@ -963,8 +963,8 @@ def head(self, n=5): Essentially equivalent to ``.apply(lambda x: x.head(n))``, except ignores as_index flag. - Example - ------- + Examples + -------- >>> df = DataFrame([[1, 2], [1, 4], [5, 6]], columns=['A', 'B']) @@ -990,8 +990,8 @@ def tail(self, n=5): Essentially equivalent to ``.apply(lambda x: x.tail(n))``, except ignores as_index flag. - Example - ------- + Examples + -------- >>> df = DataFrame([[1, 2], [1, 4], [5, 6]], columns=['A', 'B']) @@ -2452,8 +2452,8 @@ def filter(self, func, dropna=True, *args, **kwargs): dropna : Drop groups that do not pass the filter. True by default; if False, groups that evaluate False are filled with NaNs. - Example - ------- + Examples + -------- >>> grouped.filter(lambda x: x.mean() > 0) Returns @@ -3083,7 +3083,7 @@ def filter(self, func, dropna=True, *args, **kwargs): Each subframe is endowed the attribute 'name' in case you need to know which group you are working on. - Example + Examples -------- >>> grouped = df.groupby(lambda x: mapping[x]) >>> grouped.filter(lambda x: x['A'].sum() + x['B'].sum() > 0) diff --git a/pandas/io/json.py b/pandas/io/json.py index 4ed325df9a747..9e8ef74545ef2 100644 --- a/pandas/io/json.py +++ b/pandas/io/json.py @@ -573,7 +573,9 @@ def nested_to_record(ds, prefix="", level=0): ------- d - dict or list of dicts, matching `ds` - Example: + Examples + -------- + IN[52]: nested_to_record(dict(flat1=1,dict1=dict(c=1,d=2), nested=dict(e=dict(c=1,d=2),d=2))) Out[52]: diff --git a/pandas/tools/plotting.py b/pandas/tools/plotting.py index 80db990a25ea7..1774133dd4c9d 100644 --- a/pandas/tools/plotting.py +++ b/pandas/tools/plotting.py @@ -2328,10 +2328,10 @@ def _plot(data, x=None, y=None, subplots=False, series_ax = """ax : matplotlib axes object If not passed, uses gca()""" -df_note = """- If `kind`='bar' or 'barh', you can specify relative alignments +df_note = """- If `kind` = 'bar' or 'barh', you can specify relative alignments for bar plot layout by `position` keyword. From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5 (center) - - If `kind`='hexbin', you can control the size of the bins with the + - If `kind` = 'hexbin', you can control the size of the bins with the `gridsize` argument. By default, a histogram of the counts around each `(x, y)` point is computed. You can specify alternative aggregations by passing values to the `C` and `reduce_C_function` arguments. @@ -2425,7 +2425,7 @@ def _plot(data, x=None, y=None, subplots=False, Notes ----- - If `kind`='hexbin', you can control the size of the bins with the + If `kind` = 'hexbin', you can control the size of the bins with the `gridsize` argument. By default, a histogram of the counts around each `(x, y)` point is computed. You can specify alternative aggregations by passing values to the `C` and `reduce_C_function` arguments. @@ -2433,10 +2433,11 @@ def _plot(data, x=None, y=None, subplots=False, is a function of one argument that reduces all the values in a bin to a single number (e.g. `mean`, `max`, `sum`, `std`). - If `kind`='scatter' and the argument `c` is the name of a dataframe column, + If `kind` = 'scatter' and the argument `c` is the name of a dataframe column, the values of that column are used to color each point. - See matplotlib documentation online for more on this subject %(klass_note)s + """ @Appender(_shared_docs['plot'] % _shared_doc_df_kwargs)