Skip to content

Commit 9601f95

Browse files
datapythonistaPingviinituutti
authored andcommitted
DOC: Creating top-level user guide section, and moving pages inside (pandas-dev#24677)
1 parent 0ebabaa commit 9601f95

21 files changed

+62
-41
lines changed

doc/source/index.rst.template

+1-19
Original file line numberDiff line numberDiff line change
@@ -131,25 +131,7 @@ See the package overview for more detail about what's in the library.
131131
cookbook
132132
dsintro
133133
basics
134-
text
135-
options
136-
indexing
137-
advanced
138-
computation
139-
missing_data
140-
groupby
141-
merging
142-
reshaping
143-
timeseries
144-
timedeltas
145-
categorical
146-
integer_na
147-
visualization
148-
style
149-
io
150-
enhancingperf
151-
sparse
152-
gotchas
134+
user_guide/index
153135
r_interface
154136
ecosystem
155137
comparison_with_r
File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/source/enhancingperf.rst renamed to doc/source/user_guide/enhancingperf.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -783,15 +783,15 @@ significant performance benefit. Here is a plot showing the running time of
783783
computation. The two lines are two different engines.
784784

785785

786-
.. image:: _static/eval-perf.png
786+
.. image:: ../_static/eval-perf.png
787787

788788

789789
.. note::
790790

791791
Operations with smallish objects (around 15k-20k rows) are faster using
792792
plain Python:
793793

794-
.. image:: _static/eval-perf-small.png
794+
.. image:: ../_static/eval-perf-small.png
795795

796796

797797
This plot was created using a ``DataFrame`` with 3 columns each containing
File renamed without changes.
File renamed without changes.

doc/source/user_guide/index.rst

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{{ header }}
2+
3+
.. _user_guide:
4+
5+
==========
6+
User Guide
7+
==========
8+
9+
The User Guide covers all of pandas by topic area. Each of the subsections
10+
introduces a topic (such as "working with missing data"), and discusses how
11+
pandas approaches the problem, with many examples throughout.
12+
13+
Users brand-new to pandas should start with :ref:`10min`.
14+
15+
Further information on any specific method can be obtained in the
16+
:ref:`api`.
17+
18+
.. toctree::
19+
:maxdepth: 2
20+
21+
io
22+
indexing
23+
advanced
24+
merging
25+
reshaping
26+
text
27+
missing_data
28+
categorical
29+
integer_na
30+
visualization
31+
computation
32+
groupby
33+
timeseries
34+
timedeltas
35+
style
36+
options
37+
enhancingperf
38+
sparse
39+
gotchas

doc/source/indexing.rst renamed to doc/source/user_guide/indexing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1392,15 +1392,15 @@ Performance of :meth:`~pandas.DataFrame.query`
13921392
``DataFrame.query()`` using ``numexpr`` is slightly faster than Python for
13931393
large frames.
13941394

1395-
.. image:: _static/query-perf.png
1395+
.. image:: ../_static/query-perf.png
13961396

13971397
.. note::
13981398

13991399
You will only see the performance benefits of using the ``numexpr`` engine
14001400
with ``DataFrame.query()`` if your frame has more than approximately 200,000
14011401
rows.
14021402

1403-
.. image:: _static/query-perf-small.png
1403+
.. image:: ../_static/query-perf-small.png
14041404

14051405
This plot was created using a ``DataFrame`` with 3 columns each containing
14061406
floating point values generated using ``numpy.random.randn()``.
File renamed without changes.

doc/source/io.rst renamed to doc/source/user_guide/io.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -2549,7 +2549,7 @@ in the method ``to_string`` described above.
25492549
HTML:
25502550

25512551
.. raw:: html
2552-
:file: _static/basic.html
2552+
:file: ../_static/basic.html
25532553

25542554
The ``columns`` argument will limit the columns shown:
25552555

@@ -2565,7 +2565,7 @@ The ``columns`` argument will limit the columns shown:
25652565
HTML:
25662566

25672567
.. raw:: html
2568-
:file: _static/columns.html
2568+
:file: ../_static/columns.html
25692569

25702570
``float_format`` takes a Python callable to control the precision of floating
25712571
point values:
@@ -2582,7 +2582,7 @@ point values:
25822582
HTML:
25832583

25842584
.. raw:: html
2585-
:file: _static/float_format.html
2585+
:file: ../_static/float_format.html
25862586

25872587
``bold_rows`` will make the row labels bold by default, but you can turn that
25882588
off:
@@ -2597,7 +2597,7 @@ off:
25972597
write_html(df, 'nobold', bold_rows=False)
25982598
25992599
.. raw:: html
2600-
:file: _static/nobold.html
2600+
:file: ../_static/nobold.html
26012601

26022602
The ``classes`` argument provides the ability to give the resulting HTML
26032603
table CSS classes. Note that these classes are *appended* to the existing
@@ -2627,7 +2627,7 @@ that contain URLs.
26272627
HTML:
26282628

26292629
.. raw:: html
2630-
:file: _static/render_links.html
2630+
:file: ../_static/render_links.html
26312631

26322632
Finally, the ``escape`` argument allows you to control whether the
26332633
"<", ">" and "&" characters escaped in the resulting HTML (by default it is
@@ -2651,7 +2651,7 @@ Escaped:
26512651
print(df.to_html())
26522652
26532653
.. raw:: html
2654-
:file: _static/escape.html
2654+
:file: ../_static/escape.html
26552655

26562656
Not escaped:
26572657

@@ -2660,7 +2660,7 @@ Not escaped:
26602660
print(df.to_html(escape=False))
26612661
26622662
.. raw:: html
2663-
:file: _static/noescape.html
2663+
:file: ../_static/noescape.html
26642664

26652665
.. note::
26662666

File renamed without changes.
File renamed without changes.

doc/source/options.rst renamed to doc/source/user_guide/options.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ If a DataFrame or Series contains these characters, the default output mode may
487487
df = pd.DataFrame({u'国籍': ['UK', u'日本'], u'名前': ['Alice', u'しのぶ']})
488488
df
489489
490-
.. image:: _static/option_unicode01.png
490+
.. image:: ../_static/option_unicode01.png
491491

492492
Enabling ``display.unicode.east_asian_width`` allows pandas to check each character's "East Asian Width" property.
493493
These characters can be aligned properly by setting this option to ``True``. However, this will result in longer render
@@ -498,7 +498,7 @@ times than the standard ``len`` function.
498498
pd.set_option('display.unicode.east_asian_width', True)
499499
df
500500
501-
.. image:: _static/option_unicode02.png
501+
.. image:: ../_static/option_unicode02.png
502502

503503
In addition, Unicode characters whose width is "Ambiguous" can either be 1 or 2 characters wide depending on the
504504
terminal setting or encoding. The option ``display.unicode.ambiguous_as_wide`` can be used to handle the ambiguity.
@@ -510,7 +510,7 @@ By default, an "Ambiguous" character's width, such as "¡" (inverted exclamation
510510
df = pd.DataFrame({'a': ['xxx', u'¡¡'], 'b': ['yyy', u'¡¡']})
511511
df
512512
513-
.. image:: _static/option_unicode03.png
513+
.. image:: ../_static/option_unicode03.png
514514

515515
Enabling ``display.unicode.ambiguous_as_wide`` makes pandas interpret these characters' widths to be 2.
516516
(Note that this option will only be effective when ``display.unicode.east_asian_width`` is enabled.)
@@ -522,7 +522,7 @@ However, setting this option incorrectly for your terminal will cause these char
522522
pd.set_option('display.unicode.ambiguous_as_wide', True)
523523
df
524524
525-
.. image:: _static/option_unicode04.png
525+
.. image:: ../_static/option_unicode04.png
526526

527527
.. ipython:: python
528528
:suppress:

doc/source/reshaping.rst renamed to doc/source/user_guide/reshaping.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Reshaping and Pivot Tables
99
Reshaping by pivoting DataFrame objects
1010
---------------------------------------
1111

12-
.. image:: _static/reshaping_pivot.png
12+
.. image:: ../_static/reshaping_pivot.png
1313

1414
.. ipython:: python
1515
:suppress:
@@ -101,7 +101,7 @@ are homogeneously-typed.
101101
Reshaping by stacking and unstacking
102102
------------------------------------
103103

104-
.. image:: _static/reshaping_stack.png
104+
.. image:: ../_static/reshaping_stack.png
105105

106106
Closely related to the :meth:`~DataFrame.pivot` method are the related
107107
:meth:`~DataFrame.stack` and :meth:`~DataFrame.unstack` methods available on
@@ -116,7 +116,7 @@ Closely related to the :meth:`~DataFrame.pivot` method are the related
116116
(possibly hierarchical) row index to the column axis, producing a reshaped
117117
``DataFrame`` with a new inner-most level of column labels.
118118

119-
.. image:: _static/reshaping_unstack.png
119+
.. image:: ../_static/reshaping_unstack.png
120120

121121
The clearest way to explain is by example. Let's take a prior example data set
122122
from the hierarchical indexing section:
@@ -158,7 +158,7 @@ unstacks the **last level**:
158158
159159
.. _reshaping.unstack_by_name:
160160

161-
.. image:: _static/reshaping_unstack_1.png
161+
.. image:: ../_static/reshaping_unstack_1.png
162162

163163
If the indexes have names, you can use the level names instead of specifying
164164
the level numbers:
@@ -168,7 +168,7 @@ the level numbers:
168168
stacked.unstack('second')
169169
170170
171-
.. image:: _static/reshaping_unstack_0.png
171+
.. image:: ../_static/reshaping_unstack_0.png
172172

173173
Notice that the ``stack`` and ``unstack`` methods implicitly sort the index
174174
levels involved. Hence a call to ``stack`` and then ``unstack``, or vice versa,
@@ -279,7 +279,7 @@ the right thing:
279279
Reshaping by Melt
280280
-----------------
281281

282-
.. image:: _static/reshaping_melt.png
282+
.. image:: ../_static/reshaping_melt.png
283283

284284
The top-level :func:`~pandas.melt` function and the corresponding :meth:`DataFrame.melt`
285285
are useful to massage a ``DataFrame`` into a format where one or more columns
File renamed without changes.

doc/source/style.ipynb renamed to doc/source/user_guide/style.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@
992992
"source": [
993993
"A screenshot of the output:\n",
994994
"\n",
995-
"![Excel spreadsheet with styled DataFrame](_static/style-excel.png)\n"
995+
"![Excel spreadsheet with styled DataFrame](../_static/style-excel.png)\n"
996996
]
997997
},
998998
{
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)