-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC:Remove DataFrame.append from the 10min intro #27520
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
Conversation
Remove the `append` section from 10 min intro doc as complexity of that is very different than `list.append` closes #27518
As a note, the DataFrame.append API docs have a good discussion of this https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.append.html#pandas.DataFrame.append. We need to determine whether the "append" use-case (incrementally building a DataFrame) is important enough to warrant inclusion in the 10min intro. |
I think as we already have explained |
I'd prefer a warning and link to append docs about performance rather than outright removal |
CI should be fixed if you fetch and merge master then push.
Note that we do still discuss DataFrame.append in the user guide: https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html#concatenating-using-append. I just don't think it's valuable enough to include in your first 10 minutes to learning pandas. That said, we may want to head of the style of iteratively building a DataFrame, like you would with a list, by leaving a comment at the bottom of https://pandas.pydata.org/pandas-docs/stable/getting_started/10min.html#object-creation saying something like
How does that sound @WillAyd? |
Sounds good! |
doc/source/getting_started/10min.rst
Outdated
@@ -83,6 +83,13 @@ As you can see, the columns ``A``, ``B``, ``C``, and ``D`` are automatically | |||
tab completed. ``E`` is there as well; the rest of the attributes have been | |||
truncated for brevity. | |||
|
|||
.. note:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't seem like a good place for this, can you put near usages of concat instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, even I felt that would be a better place for this.
@jreback I have made the required changes. |
doc/source/getting_started/10min.rst
Outdated
@@ -468,6 +468,13 @@ Concatenating pandas objects together with :func:`concat`: | |||
|
|||
pd.concat(pieces) | |||
|
|||
.. note:: | |||
Adding a column to a DataFrame is relatively fast. Adding a row, however, | |||
requires a full copy of the data and a construction of a new Index, which |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use double-backticks around DataFrame. Also let's make this shorter / simpler.
first part do something like
Adding a column to a DataFrame is relatively fast, However, adding a row requires a copy, and may be expensive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jreback Done. Let me know if any more changes are required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small style corrections. LGTM otherwise.
@TomAugspurger Done! |
Thanks @sameshl! |
* DOC:Remove DataFrame.append from the 10min intro Remove the `append` section from 10 min intro doc as complexity of that is very different than `list.append` closes pandas-dev#27518
Remove the
append
section from 10 min intro doc as complexity of that is very different thanlist.append