diff --git a/doc/source/_static/css/getting_started.css b/doc/source/_static/css/getting_started.css index bb24761cdb159..84eafa308175c 100644 --- a/doc/source/_static/css/getting_started.css +++ b/doc/source/_static/css/getting_started.css @@ -131,20 +131,30 @@ ul.task-bullet > li > p:first-child { /* Getting started index page */ -.intro-card { +.comparison-card { background:#FFF; border-radius:0; padding: 30px 10px 10px 10px; margin: 10px 0px; } -.intro-card .card-text { - margin:20px 0px; - /*min-height: 150px; */ +.comparison-card p.card-text { + margin: 0px; } -.intro-card .card-img-top { +.comparison-card .card-img-top { margin: 10px; + margin-bottom: 20px; + height: 72px; +} + +.comparison-card-excel .card-img-top, .comparison-card-stata .card-img-top, .comparison-card-sas .card-img-top { + height: 52px; +} + +.comparison-card .card-footer { + border: none; + background-color:white; } .install-block { @@ -154,10 +164,13 @@ ul.task-bullet > li > p:first-child { .install-card .card-header { border: none; background-color:white; + padding: 1rem 1rem 0rem 1rem; +} + +.install-card .card-header p.card-text { color: #150458; font-size: 1.1rem; font-weight: bold; - padding: 1rem 1rem 0rem 1rem; } .install-card .card-footer { diff --git a/doc/source/_static/css/pandas.css b/doc/source/_static/css/pandas.css index 87357fd8ae716..452c7d20ff5df 100644 --- a/doc/source/_static/css/pandas.css +++ b/doc/source/_static/css/pandas.css @@ -5,39 +5,40 @@ --pst-color-info: 23, 162, 184; } -/* Getting started index page */ +/* Main index page overview cards */ .intro-card { background: #fff; border-radius: 0; - padding: 30px 10px 10px 10px; + padding: 30px 10px 20px 10px; margin: 10px 0px; } -.intro-card .card-text { - margin: 20px 0px; - /*min-height: 150px; */ +.intro-card p.card-text { + margin: 0px; } -.custom-button { - background-color: #dcdcdc; +.intro-card .card-img-top { + margin: 10px; + height: 52px; +} + +.intro-card .card-header { border: none; - color: #484848; - text-align: center; - text-decoration: none; - display: inline-block; - font-size: 0.9rem; - border-radius: 0.5rem; - max-width: 220px; - padding: 0.5rem 0rem; + background-color:white; + color: #150458 !important; + font-size: var(--pst-font-size-h5); + font-weight: bold; + padding: 2.5rem 0rem 0.5rem 0rem; } -.custom-button a { - color: #484848; +.intro-card .card-footer { + border: none; + background-color:white; } -.custom-button p { - margin-top: 0; - margin-bottom: 0rem; - color: #484848; +.intro-card .card-footer p.card-text{ + max-width: 220px; + margin-left: auto; + margin-right: auto; } diff --git a/doc/source/conf.py b/doc/source/conf.py index 66f5e631fa656..8df048ce65582 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -65,6 +65,7 @@ "sphinx.ext.ifconfig", "sphinx.ext.linkcode", "nbsphinx", + "sphinx_panels", "contributors", # custom pandas extension ] @@ -139,6 +140,10 @@ # nbsphinx do not use requirejs (breaks bootstrap) nbsphinx_requirejs_path = "" +# sphinx-panels shouldn't add bootstrap css since the pydata-sphinx-theme +# already loads it +panels_add_bootstrap_css = False + # Add any paths that contain templates here, relative to this directory. templates_path = ["../_templates"] diff --git a/doc/source/getting_started/index.rst b/doc/source/getting_started/index.rst index d05384502bde7..4792d26d021d6 100644 --- a/doc/source/getting_started/index.rst +++ b/doc/source/getting_started/index.rst @@ -9,82 +9,49 @@ Getting started Installation ------------ -.. raw:: html +.. panels:: + :card: + install-card + :column: col-lg-6 col-md-6 col-sm-12 col-xs-12 p-3 -
-
-
-
-
- Working with conda? -
-
-

+ Working with conda? + ^^^^^^^^^^^^^^^^^^^ -pandas is part of the `Anaconda `__ distribution and can be -installed with Anaconda or Miniconda: + pandas is part of the `Anaconda `__ + distribution and can be installed with Anaconda or Miniconda: -.. raw:: html + ++++++++++++++++++++++ -

-
- -
-
-
-
-
- Prefer pip? -
-
-

+ pandas can be installed via pip from `PyPI `__. -pandas can be installed via pip from `PyPI `__. + ++++ -.. raw:: html + .. code-block:: bash -

-
- -
-
-
-
-
- In-depth instructions? -
-
-

Installing a specific version? - Installing from source? - Check the advanced installation page.

- -.. container:: custom-button - - :ref:`Learn more ` + .. link-button:: ./install.html + :type: url + :text: Learn more + :classes: btn-secondary stretched-link -.. raw:: html - -
-
-
-
-
.. _gentle_intro: @@ -569,97 +536,90 @@ Coming from... Are you familiar with other software for manipulating tablular data? Learn the pandas-equivalent operations compared to software you already know: -.. raw:: html +.. panels:: + :card: + comparison-card text-center shadow + :column: col-lg-6 col-md-6 col-sm-6 col-xs-12 d-flex -
-
-
-
- R project logo -
-

The R programming language provides the dataframe data structure and multiple packages, - such as tidyverse use and extend data.frames for convenient data handling - functionalities similar to pandas.

+ --- + :card: + comparison-card-r + :img-top: ../_static/logo_r.svg -.. container:: custom-button + The `R programming language `__ provides the + ``data.frame`` data structure and multiple packages, such as + `tidyverse `__ use and extend ``data.frame`` + for convenient data handling functionalities similar to pandas. - :ref:`Learn more ` + +++ -.. raw:: html + .. link-button:: compare_with_r + :type: ref + :text: Learn more + :classes: btn-secondary stretched-link -
-
-
-
-
- SQL logo -
-

Already familiar to SELECT, GROUP BY, JOIN, etc.? - Most of these SQL manipulations do have equivalents in pandas.

-.. container:: custom-button + --- + :card: + comparison-card-sql + :img-top: ../_static/logo_sql.svg - :ref:`Learn more ` + Already familiar to ``SELECT``, ``GROUP BY``, ``JOIN``, etc.? + Most of these SQL manipulations do have equivalents in pandas. -.. raw:: html + +++ -
-
-
-
-
- STATA logo -
-

The data set included in the - STATA statistical software suite corresponds - to the pandas dataframe. Many of the operations known from STATA have an equivalent - in pandas.

+ .. link-button:: compare_with_sql + :type: ref + :text: Learn more + :classes: btn-secondary stretched-link -.. container:: custom-button - :ref:`Learn more ` + --- + :card: + comparison-card-stata + :img-top: ../_static/logo_stata.svg -.. raw:: html + The ``data set`` included in the `STATA `__ + statistical software suite corresponds to the pandas ``DataFrame``. + Many of the operations known from STATA have an equivalent in pandas. -
-
-
-
-
- Excel logo -
-

Users of Excel - or other spreadsheet programs will find that many of the concepts are transferrable to pandas.

+ +++ -.. container:: custom-button + .. link-button:: compare_with_stata + :type: ref + :text: Learn more + :classes: btn-secondary stretched-link - :ref:`Learn more ` -.. raw:: html + --- + :card: + comparison-card-excel + :img-top: ../_static/spreadsheets/logo_excel.svg -
-
-
-
-
- SAS logo -
-

The SAS statistical software suite - also provides the data set corresponding to the pandas dataframe. - Also SAS vectorized operations, filtering, string processing operations, and more have similar - functions in pandas.

+ Users of `Excel `__ + or other spreadsheet programs will find that many of the concepts are + transferrable to pandas. -.. container:: custom-button + +++ - :ref:`Learn more ` + .. link-button:: compare_with_spreadsheets + :type: ref + :text: Learn more + :classes: btn-secondary stretched-link -.. raw:: html -
-
-
-
-
+ --- + :card: + comparison-card-sas + :img-top: ../_static/logo_sas.svg + + The `SAS `__ statistical software suite + also provides the ``data set`` corresponding to the pandas ``DataFrame``. + Also SAS vectorized operations, filtering, string processing operations, + and more have similar functions in pandas. + + +++ + + .. link-button:: compare_with_sas + :type: ref + :text: Learn more + :classes: btn-secondary stretched-link + Tutorials --------- diff --git a/doc/source/index.rst.template b/doc/source/index.rst.template index c6deb4b7ea383..51a6807b30e2a 100644 --- a/doc/source/index.rst.template +++ b/doc/source/index.rst.template @@ -23,82 +23,75 @@ pandas documentation easy-to-use data structures and data analysis tools for the `Python `__ programming language. -.. raw:: html - -
-
-
-
- getting started with pandas action icon -
-
Getting started
-

New to pandas? Check out the getting started guides. They - contain an introduction to pandas' main concepts and links to additional tutorials.

- -.. container:: custom-button - - :ref:`To the getting started guides` - -.. raw:: html - -
-
-
-
-
- pandas user guide action icon -
-
User guide
-

The user guide provides in-depth information on the - key concepts of pandas with useful background information and explanation.

- -.. container:: custom-button - - :ref:`To the user guide` - -.. raw:: html - -
-
-
-
-
- api of pandas action icon -
-
API reference
-

The reference guide contains a detailed description of - the pandas API. The reference describes how the methods work and which parameters can - be used. It assumes that you have an understanding of the key concepts.

- -.. container:: custom-button - - :ref:`To the reference guide` - -.. raw:: html - -
-
-
-
-
- contribute to pandas action icon -
-
Developer guide
-

Saw a typo in the documentation? Want to improve - existing functionalities? The contributing guidelines will guide - you through the process of improving pandas.

- -.. container:: custom-button - - :ref:`To the development guide` - -.. raw:: html - -
-
-
-
-
+.. panels:: + :card: + intro-card text-center + :column: col-lg-6 col-md-6 col-sm-6 col-xs-12 d-flex + + --- + :img-top: _static/index_getting_started.svg + + Getting started + ^^^^^^^^^^^^^^^ + + New to *pandas*? Check out the getting started guides. They contain an + introduction to *pandas'* main concepts and links to additional tutorials. + + +++ + + .. link-button:: getting_started + :type: ref + :text: To the getting started guides + :classes: btn-block btn-secondary stretched-link + + --- + :img-top: _static/index_user_guide.svg + + User guide + ^^^^^^^^^^ + + The user guide provides in-depth information on the + key concepts of pandas with useful background information and explanation. + + +++ + + .. link-button:: user_guide + :type: ref + :text: To the user guide + :classes: btn-block btn-secondary stretched-link + + --- + :img-top: _static/index_api.svg + + API reference + ^^^^^^^^^^^^^ + + The reference guide contains a detailed description of + the pandas API. The reference describes how the methods work and which parameters can + be used. It assumes that you have an understanding of the key concepts. + + +++ + + .. link-button:: api + :type: ref + :text: To the reference guide + :classes: btn-block btn-secondary stretched-link + + --- + :img-top: _static/index_contribute.svg + + Developer guide + ^^^^^^^^^^^^^^^ + + Saw a typo in the documentation? Want to improve + existing functionalities? The contributing guidelines will guide + you through the process of improving pandas. + + +++ + + .. link-button:: development + :type: ref + :text: To the development guide + :classes: btn-block btn-secondary stretched-link {% if single_doc and single_doc.endswith('.rst') -%} diff --git a/environment.yml b/environment.yml index feea3445cb4fe..b942adb764104 100644 --- a/environment.yml +++ b/environment.yml @@ -33,6 +33,7 @@ dependencies: - gitpython # obtain contributors from git for whatsnew - gitdb - sphinx + - sphinx-panels # documentation (jupyter notebooks) - nbconvert>=5.4.1 diff --git a/requirements-dev.txt b/requirements-dev.txt index 349b176253acb..094456eb85c9a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -19,6 +19,7 @@ pyupgrade gitpython gitdb sphinx +sphinx-panels nbconvert>=5.4.1 nbsphinx pandoc