Beta
Course Notes
Use this workspace to take notes, store code snippets, and build your own interactive cheatsheet!
Note that the data from the course is not yet added to this workspace. You will need to navigate to the course overview page, download any data you wish to use, and add it to the file browser.
# Import any packages you want to use here
# Add your code snippets here
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from datetime import datetime
%matplotlib inline
dogs = pd.read_csv('dogs1.csv')
dogs
nba = pd.read_csv('nba.csv')
nba
export = pd.read_csv('export products2011.csv')
export
nba = pd.read_csv('nba.csv')
nba.head()
dogs = pd.read_csv('dogs1.csv')
dogs.head(5)
Take Notes
Add notes here about the concepts you've learned and code cells with code you want to keep.
Add your notes here
In this workspace we use
pandas DATAFRAME chart
Use some Manipulating data
1. Pandas dataframe bar plot
2. Pandas dataframe scatter plot
3. Pandas dataframe box plot
4. Pandas dataframe line plot
5. Pandas dataframe basic plot
Seaborn:
1.barplot
2.boxplot
3. relplot
4.hisplot
Selecting DataFrame
You can subset or selecting dataframe using loc for label and iloc for index
# Subset DataFrame
subset_dogs = dogs[["name", "weight", "breed"]]
subset_dogs.head()
# Take single column
name = subset_dogs.name
name.head()
# or
subset_dogs['name'].head()
dogs.sample(3)
# Take first row
dogs.iloc[0]
# Take rows by index (position) take second row all columns
dogs.iloc[1, :]