Compare commits
No commits in common. "6d866a38d330cea42778ef6e6df387889f31df50" and "08b4b95cd5f196e9a7dd1c2d592ba1c62d36f11b" have entirely different histories.
6d866a38d3
...
08b4b95cd5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -902,33 +902,6 @@ The basic indexable objects are
|
||||
```
|
||||
\normalsize
|
||||
|
||||
##
|
||||
|
||||
\setbeamertemplate{itemize item}{\color{red}\tiny$\blacksquare$}
|
||||
|
||||
* Selecting data of pandas objects continued
|
||||
|
||||
\vspace{0.5cm}
|
||||
|
||||
* More operations
|
||||
|
||||
\footnotesize
|
||||
|
||||
```python
|
||||
df.drop(['col1', 'col2'], axis=1) # removes columns 'col1' and 'col2'
|
||||
df.fillna(0) # fills missing values with 0
|
||||
df.fillna(method='ffill') # fills missing values with previous
|
||||
# non-missing value in the column
|
||||
df.replace('old_val', 'new_val') # replaces 'old_val' with 'new_val'
|
||||
df.groupby('col1').mean() # groups by 'col1' and computes
|
||||
# the mean of each group
|
||||
pd.merge(df1, df2, on='column1') # merges df1 and df2 on 'column1'
|
||||
df['column1'].value_counts() # counts the number of occurrences
|
||||
# of each unique value in 'column'
|
||||
```
|
||||
\normalsize
|
||||
|
||||
\vspace{3cm}
|
||||
|
||||
## Pandas - plotting data
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user