Data Manipulation With Python
Data Manipulation With Python
print(chess.head())
print(employee[employee['salary_usd'] == 5000])
HARD
plt.xticks(rotation = 45)
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
plt.xticks(rotation = 45)
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
sns.lineplot(
x = 'date',
y = 'close',
data=amazon)
plt.xticks(rotation = 45)
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
ax = sns.scatterplot(data = steam,
x = "temp",
y = "usage")
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
plt.show()
HARD
ax = sns.scatterplot(x='age',
y='mpg',
hue='emissions',
data=valuation)
plt.show()
HARD
plt.show()
import pandas as pd
column_names = {
'slope_of_peak_exercise_st_segment': 'slope',
'fasting_blood_sugar_gt_120_mg_per_dl': 'fbs'
}
heart_clean = heart.rename(columns=column_names)
print(heart_clean.head())
print(employee.index)
print(chess.dtypes)
import pandas as pd
column_names = [
'temperature',
'luminosity',
'radius'
]
stars.columns = column_names
print(stars.head())
from scipy import stats
iqr_age = stats.iqr(age)
print(iqr_age)
from scipy import stats
IQR = stats.iqr(pH)
print(IQR)
print(chess.isna().sum())
missing_total_by_column = wine.isna().sum()
print(missing_total_by_column)
players_per_country = chess['Federation'].value_counts()
print(players_per_country.head())
HARD
count_by_country = wine['country'].value_counts()
print(count_by_country)
private_employee = employee[['employee_id', 'salary']]
print(private_employee)
print(df.loc[:,["gh owner"]])
import matplotlib.pyplot as plt
import seaborn as sns
ax = sns.swarmplot(x = "measurement",
y = "value",
hue = "species",
data=iris)
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
plt.show()
import pandas as pd
print(df.stars.apply(lambda x: x / 1000))
HARD
print(protein)
HARD
sns.countplot(pets)
plt.show()