Skip to content

DOC: remove use of head() in the comparison docs #38935

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 5 commits into from
Jan 4, 2021

Conversation

afeld
Copy link
Member

@afeld afeld commented Jan 4, 2021

This helps to clarify the examples by removing code that isn't relevant. Added a dedicated section to the SAS, SQL, and Stata pages.

This builds on #38933; will rebase and mark as ready for review once that's merged. In the meantime, the last commit is the one that can be reviewed. Thanks!

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

drop all rows with any missing values, replacing missing values with a specified
value, like the mean, or forward filling from previous rows. See the
:ref:`missing data documentation<missing_data>` for more.
pandas provides :ref:`a variety of methods to work with missing data <missing_data>`. Here are some examples:
Copy link
Member Author

Choose a reason for hiding this comment

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

Split out the examples to sub-headings below.

.. note::

Throughout this tutorial, the pandas ``DataFrame`` will be displayed by calling
``df.head()``, which displays the first N (default 5) rows of the ``DataFrame``.
Copy link
Member Author

@afeld afeld Jan 4, 2021

Choose a reason for hiding this comment

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

No longer the case. Ditto for the Stata page.

@@ -138,6 +128,19 @@ In addition to text/csv, pandas supports a variety of other data formats
such as Excel, HDF5, and SQL databases. These are all read via a ``pd.read_*``
function. See the :ref:`IO documentation<io>` for more details.

Limiting output
~~~~~~~~~~~~~~~
Copy link
Member Author

Choose a reason for hiding this comment

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

New sections in each page.

place. To make these changes persist, assign the operation back to a variable.

Keep certain columns
''''''''''''''''''''
Copy link
Member Author

Choose a reason for hiding this comment

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

These headings are new.

@afeld afeld marked this pull request as ready for review January 4, 2021 05:13
@afeld
Copy link
Member Author

afeld commented Jan 4, 2021

Ready for review! Added a few more fixes+improvements to the pull request — see individual commits.

afeld added 5 commits January 4, 2021 01:03
Now they start with a sentence that sounds like a new paragraph.
This helps to clarify the examples by removing code that isn't relevant.
Added a dedicated section to the SAS, SQL, and Stata pages.
Easier to see what's happening in each line of code, and make navigation
easier.
@jreback jreback added this to the 1.3 milestone Jan 4, 2021
@jreback jreback merged commit 8b2ebdb into pandas-dev:master Jan 4, 2021
@jreback
Copy link
Contributor

jreback commented Jan 4, 2021

thanks @afeld

luckyvs1 pushed a commit to luckyvs1/pandas that referenced this pull request Jan 20, 2021
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.

2 participants