diff --git a/guide/english/data-science-tools/pandas/index.md b/guide/english/data-science-tools/pandas/index.md index e3ab6a4705..f9642ee263 100644 --- a/guide/english/data-science-tools/pandas/index.md +++ b/guide/english/data-science-tools/pandas/index.md @@ -147,6 +147,40 @@ right = pd.DataFrame({'C': ['C0', 'C2', 'C3'], ```python left.join(right) ``` +# Pandas Functions +## Information on Unique Values +```python +df['col1'].unique() +``` +```python +df['col1'].nunique() +``` +```python +df['col1'].value_counts() +``` +## Selecting Data +```python +newdf = df[(df['col1']>2) & (df['col2']==123)] +``` +```python +newdf +``` +## Applying Functions +```python +def times2(x): + return x*2 +``` +```python +df['col1'].apply(times2) +``` + +```python +df['col1'].apply(len) +``` +## Permanently removing a column +```python +del df['col1'] +``` #### More Information: 1. [pandas](http://pandas.pydata.org/)