Skip to content

DOC: add more examples to StringMethods on Index #9858

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 1 commit into from
Apr 12, 2015

Conversation

mortada
Copy link
Contributor

@mortada mortada commented Apr 11, 2015

as discussed in #9667

@jorisvandenbossche please take a look, thanks

index=range(3))
df

Since the column of a DataFrame is an Index object, we can use the .str accessor
Copy link
Member

Choose a reason for hiding this comment

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

maybe "column names" instead of "columns"?

@mortada
Copy link
Contributor Author

mortada commented Apr 11, 2015

@shoyer good idea, it's updated

index=range(3))
df

Since ``df.columns`` is an Index object, we can use the .str accessor
Copy link
Member

Choose a reason for hiding this comment

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

quote .str with two backticks?

@@ -37,6 +37,32 @@ the equivalent (scalar) built-in string methods:
idx.str.lstrip()
idx.str.rstrip()

The string methods on Index are especially useful for cleaning up or
transforming DataFrame columns. For instance, you may have columns with
leading or trailing whitespaces:
Copy link
Member

Choose a reason for hiding this comment

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

Just "whitespace", I think

@shoyer
Copy link
Member

shoyer commented Apr 11, 2015

This looks great to me! I'll just hold off on merging until Joris can take a look.

@jorisvandenbossche
Copy link
Member

Looks good, thanks a lot!

jorisvandenbossche added a commit that referenced this pull request Apr 12, 2015
DOC: add more examples to StringMethods on Index
@jorisvandenbossche jorisvandenbossche merged commit f5b4775 into pandas-dev:master Apr 12, 2015
@mortada mortada deleted the index_str_docs branch April 13, 2015 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants