Skip to content

Commit bc2fa2f

Browse files
committed
DOC: add frame tab completion example in 10min.rst
1 parent 9737f27 commit bc2fa2f

File tree

3 files changed

+55
-5
lines changed

3 files changed

+55
-5
lines changed

doc/source/10min.rst

+37
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,43 @@ Having specific :ref:`dtypes <basics.dtypes>`
7474
7575
df2.dtypes
7676
77+
If you're using IPython, tab completion for column names (as well as public
78+
attributes) is automatically enabled. Here's a subset of the attributes that
79+
will be completed:
80+
81+
.. ipython::
82+
83+
@verbatim
84+
In [1]: df2.<TAB>
85+
86+
df2.A df2.boxplot
87+
df2.abs df2.C
88+
df2.add df2.clip
89+
df2.add_prefix df2.clip_lower
90+
df2.add_suffix df2.clip_upper
91+
df2.align df2.columns
92+
df2.all df2.combine
93+
df2.any df2.combineAdd
94+
df2.append df2.combine_first
95+
df2.apply df2.combineMult
96+
df2.applymap df2.compound
97+
df2.as_blocks df2.consolidate
98+
df2.asfreq df2.convert_objects
99+
df2.as_matrix df2.copy
100+
df2.astype df2.corr
101+
df2.at df2.corrwith
102+
df2.at_time df2.count
103+
df2.axes df2.cov
104+
df2.B df2.cummax
105+
df2.between_time df2.cummin
106+
df2.bfill df2.cumprod
107+
df2.blocks df2.cumsum
108+
df2.bool df2.D
109+
110+
As you can see, the columns ``A``, ``B``, ``C``, and ``D`` are automatically
111+
tab completed. ``E`` is there as well; the rest of the attributes have been
112+
truncated for brevity.
113+
77114
Viewing Data
78115
------------
79116

doc/source/groupby.rst

+15-4
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,30 @@ however pass ``sort=False`` for potential speedups:
203203
df = DataFrame({'height': height, 'weight': weight,
204204
'gender': gender}, index=time)
205205
206-
.. ipython::
206+
.. ipython:: python
207207
208-
In [7]: df
208+
df
209+
gb = df.groupby('gender')
209210
210-
In [8]: gb = df.groupby('gender')
211+
212+
.. ipython::
211213

212214
@verbatim
213-
In [9]: gb.<TAB>
215+
In [1]: gb.<TAB>
214216
gb.agg gb.boxplot gb.cummin gb.describe gb.filter gb.get_group gb.height gb.last gb.median gb.ngroups gb.plot gb.rank gb.std gb.transform
215217
gb.aggregate gb.count gb.cumprod gb.dtype gb.first gb.groups gb.hist gb.max gb.min gb.nth gb.prod gb.resample gb.sum gb.var
216218
gb.apply gb.cummax gb.cumsum gb.fillna gb.gender gb.head gb.indices gb.mean gb.name gb.ohlc gb.quantile gb.size gb.tail gb.weight
217219

218220

221+
.. ipython:: python
222+
:suppress:
223+
224+
df = DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
225+
'foo', 'bar', 'foo', 'foo'],
226+
'B' : ['one', 'one', 'two', 'three',
227+
'two', 'two', 'one', 'three'],
228+
'C' : randn(8), 'D' : randn(8)})
229+
219230
.. _groupby.multiindex:
220231

221232
GroupBy with MultiIndex

doc/source/release.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ Bug Fixes
546546
- Bug in setting with ``ix/loc`` and a mixed int/string index (:issue:`4544`)
547547
- Make sure series-series boolean comparions are label based (:issue:`4947`)
548548
- Bug in multi-level indexing with a Timestamp partial indexer (:issue:`4294`)
549-
- Tests/fix for multi-index construction of an all-nan frame (:isue:`4078`)
549+
- Tests/fix for multi-index construction of an all-nan frame (:issue:`4078`)
550550
- Fixed a bug where :func:`~pandas.read_html` wasn't correctly inferring
551551
values of tables with commas (:issue:`5029`)
552552
- Fixed a bug where :func:`~pandas.read_html` wasn't providing a stable
@@ -560,6 +560,8 @@ Bug Fixes
560560
- Fixed a bug where ``groupby`` objects didn't allow plots (:issue:`5102`).
561561
- Fixed a bug where ``groupby`` objects weren't tab-completing column names
562562
(:issue:`5102`).
563+
- Fixed a bug where ``groupby.plot()`` and friends were duplicating figures
564+
multiple times (:issue:`5102`).
563565

564566

565567
pandas 0.12.0

0 commit comments

Comments
 (0)