Skip to content

DOC: Update of the 'getting started' pages in the sphinx section of the documentation #31156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Feb 17, 2020

Conversation

stijnvanhoey
Copy link
Contributor

@stijnvanhoey stijnvanhoey commented Jan 20, 2020

This PR provides an update of the getting started pages of the Pandas documentation, following from the discussion in #26831 and the proposal. The update went together with the creation of the new theme and tries to integrate as much as possible with the new layout (using bootstrap elements). This PR focuses on the getting started section and adds new sections to the documentation:

  • An update of the 'getting started' intro page of the sphinx documentation to provide new users some more guidance on the 'first steps' with Pandas: Directions for installation, a short intro on main Pandas features each linking to a dedicated introduction tutorial (see next point), specific info targeted to people with another background and reference to more tutorials.
  • A set of tutorials which introduce some key features of the Pandas package. Each tutorial is setup as a series of 'tasks/questions' so users get a first idea of the type of problems they can solve with Pandas for that topic. All tutorials provide a set of returning elements. Both the intros as well as the tutorials itself try to guide people as much as possible to related sections of the user guide.
  • A set of schemas to illustrate certain concepts, with according to the new theme. These schemas can be used in other locations in the user guide as well.

The aim is to move the dsintro and the basics to the general user guide, as both are too extensive for a getting started section. The 10 intro tutorials try to provide an alternative that is more fit to people starting with Pandas.

There is still some work to do (typo's in the tutorials, additional schemas...), but input is certainly welcome and appreciated, I'll continue improving it. See https://stijnvanhoey.github.io/example-pandas-docs/getting-started/getting_started/index.html for a live preview.

Note: (1) a separate PR is prepared for the general sphinx intro page with @jorisvandenbossche, see #31148 (2) some of the layout issues are more general and related to the new sphinx theme and will be tackled there (e.g. spacing around titles and subtitles)

Some pictures:

  • The intro to the 10 tutorials:
    image

  • the coming from section :
    image

  • example of 'remember' section in each tutorial:
    image

import matplotlib.pyplot as plt
# use the pandas main colors
import matplotlib as mpl
mpl.rcParams['axes.prop_cycle'] = mpl.cycler(color=["#150458", "#FFCA00", "#E70488"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this looks really fancy to have the plots in pandas colors ;), I would probably leave this out of a beginners tutorial

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jorisvandenbossche
Copy link
Member

@stijnvanhoey the doc build is required to pass without any warning or error.

First, there are some warnings about images:

/home/runner/work/pandas/pandas/doc/source/getting_started/index.rst:: WARNING: image file not readable: getting_started/../../_static/schemas/01_table_dataframe.svg
/home/runner/work/pandas/pandas/doc/source/getting_started/index.rst:: WARNING: image file not readable: getting_started/../../_static/schemas/02_io_readwrite.svg
/home/runner/work/pandas/pandas/doc/source/getting_started/index.rst:: WARNING: image file not readable: getting_started/../../_static/schemas/03_subset_columns_rows.svg
/home/runner/work/pandas/pandas/doc/source/getting_started/index.rst:: WARNING: image file not readable: getting_started/../../_static/schemas/04_plot_overview.svg
/home/runner/work/pandas/pandas/doc/source/getting_started/index.rst:: WARNING: image file not readable: getting_started/../../_static/schemas/05_newcolumn_2.svg
/home/runner/work/pandas/pandas/doc/source/getting_started/index.rst:: WARNING: image file not readable: getting_started/../../_static/schemas/06_groupby.svg
/home/runner/work/pandas/pandas/doc/source/getting_started/index.rst:: WARNING: image file not readable: getting_started/../../_static/schemas/07_melt.svg
/home/runner/work/pandas/pandas/doc/source/getting_started/index.rst:: WARNING: image file not readable: getting_started/../../_static/schemas/08_concat_row.svg

I suppose this are the images in the accordion on gettings_started/index.rst. And I think they need one level of /../ less compared to the ones in the actual tutorials? (but strange that it works in the preview https://stijnvanhoey.github.io/example-pandas-docs/getting-started/getting_started/index.html ..)

Then there are also some warnings generated by the examples in the timeseries tutorial:

>>>-------------------------------------------------------------------------
Warning in /home/runner/work/pandas/pandas/doc/source/getting_started/intro_tutorials/09_timeseries.rst at block ending on line 279
Specify :okwarning: as an option in the ipython:: block to suppress this message
----------------------------------------------------------------------------
/home/runner/work/pandas/pandas/pandas/core/arrays/datetimes.py:1099: UserWarning: Converting to PeriodArray/Index representation will drop timezone information.
  UserWarning,
<<<-------------------------------------------------------------------------


>>>-------------------------------------------------------------------------
Warning in /home/runner/work/pandas/pandas/doc/source/getting_started/intro_tutorials/09_timeseries.rst at block ending on line 356
Specify :okwarning: as an option in the ipython:: block to suppress this message
----------------------------------------------------------------------------
/home/runner/work/pandas/pandas/pandas/core/arrays/datetimes.py:1099: UserWarning: Converting to PeriodArray/Index representation will drop timezone information.
  UserWarning,
<<<-------------------------------------------------------------------------

the first one is coming from

.. ipython:: python

    @savefig 09_time_section.png
    no_2["2019-05-20":"2019-05-21"].plot();

That's a strange warning, but not something you need to be concerned about in this PR. To get CI green here you can add :okwarning: to that ipython directive (and the second one that generates the warning), like:

.. ipython:: python
    :okwarning:

    @savefig 09_time_section.png
    no_2["2019-05-20":"2019-05-21"].plot();

@jorisvandenbossche
Copy link
Member

Opened #31205 for the warning

@WillAyd
Copy link
Member

WillAyd commented Jan 24, 2020

This looks great!


/* Getting started index page */

.intro-card {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved some of those (the ones that are not specific to the getting started pages, but are also used on the home page now) to a pandas.css (in a previous PR), so you can remove here

@jorisvandenbossche
Copy link
Member

Question on how to move forward here.
Are people fine with merging this mostly as is? (I am still reviewing a few details) The content already got some review on the separate repo (https://github.com/stijnvanhoey/pandas-getting-started-tutorials/)

@WillAyd
Copy link
Member

WillAyd commented Feb 13, 2020

Merge away - I think to 1.0.2 right?

@TomAugspurger TomAugspurger added this to the 1.0.2 milestone Feb 17, 2020
@TomAugspurger
Copy link
Contributor

Yep. Thanks @stijnvanhoey!

@TomAugspurger TomAugspurger merged commit 267d2d8 into pandas-dev:master Feb 17, 2020
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Feb 17, 2020
…ges in the sphinx section of the documentation
@stijnvanhoey stijnvanhoey deleted the getting-started-pages branch February 17, 2020 18:54
jorisvandenbossche pushed a commit that referenced this pull request Feb 18, 2020
… sphinx section of the documentation (#32052)

Co-authored-by: Stijn Van Hoey <stijnvanhoey@gmail.com>
roberthdevries pushed a commit to roberthdevries/pandas that referenced this pull request Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Discussion on new getting started page (Numfocus Grant)
5 participants