Skip to content

Commit 68a2791

Browse files
committed
DOC: add documentation for Panel.to_frame, close #942
1 parent 108e181 commit 68a2791

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

RELEASE.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ pandas 0.7.3
2929

3030
**New features / modules**
3131

32+
- Add group_keys argument to groupby to not add group names to MultiIndex in
33+
result of apply (GH #938)
34+
3235
**API Changes**
3336

3437
- Calling apply on grouped Series, e.g. describe(), will no longer yield

doc/source/dsintro.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,3 +747,15 @@ For example, using the earlier example data, we could do:
747747
wp.major_xs(wp.major_axis[2])
748748
wp.minor_axis
749749
wp.minor_xs('C')
750+
751+
Conversion to DataFrame
752+
~~~~~~~~~~~~~~~~~~~~~~~
753+
754+
A Panel can be represented in 2D form as a hierarchically indexed DataFrame. See the section :ref:`hierarchical indexing <indexing.hierarchical>` for more on this. To convert a Panel to a DataFrame, use the ``to_frame`` method:
755+
756+
.. ipython:: python
757+
758+
panel = Panel(np.random.randn(3, 5, 4), items=['one', 'two', 'three'],
759+
major_axis=DateRange('1/1/2000', periods=5),
760+
minor_axis=['a', 'b', 'c', 'd'])
761+
panel.to_frame()

0 commit comments

Comments
 (0)