Skip to content
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

Remove mutating examples for adding new columns #2434

Merged
merged 3 commits into from
Sep 22, 2020

Conversation

tk3369
Copy link
Contributor

@tk3369 tk3369 commented Sep 16, 2020

The rename function in pandas creates a copy and so it would more appropriate to provide the equivalent DataFrames.jl example without any mutation as well. Previous discussions at #2378 (comment)

The `rename` function in pandas creates a copy and so it would more
appropriate to provide the equivalent DataFrames.jl example without
any mutation as well.
@bkamins
Copy link
Member

bkamins commented Sep 16, 2020

Agreed - can you then just add another line where the two removed Julia codes would stay and in pandas you would show how to add a column to an existing data frame (without copying)? Thank you!

@bkamins bkamins added the doc label Sep 16, 2020
@tk3369
Copy link
Contributor Author

tk3369 commented Sep 16, 2020

Looks like 3 examples in that table have mutating versions. In pandas:

df['z1'] = df['z'] + 1
df.rename(columns = {'x': 'x_new'}, inplace = True)
df.sort_values(by = 'x', inplace = True)

How about we add a new table in the same section for these?

@bkamins
Copy link
Member

bkamins commented Sep 16, 2020

OK - then we have a clearly separated "mutating" part.

@tk3369
Copy link
Contributor Author

tk3369 commented Sep 20, 2020

  • Added dropmissing and unique to Common Operations section
  • Added Mutating Operations section

@bkamins bkamins merged commit bf1cfbd into JuliaData:master Sep 22, 2020
@bkamins
Copy link
Member

bkamins commented Sep 22, 2020

Thank you!

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