Learn practical skills, build real-world projects, and advance your career
Updated 4 years ago
Part 1: Handling missing values and cleaning our data
prefix="data/"
import pandas as pd
tourism_value = pd.read_csv(prefix+"LV_tourism_value.csv", skiprows=[0], header=None)
tourism_value
tourism_value = tourism_value.transpose()
tourism_value
tourism_value.columns = ["Year", "Tourism"]
tourism_value.drop(labels=[0], inplace=True)
tourism_value
print("Missing values")
print(tourism_value.isna().sum())
print(tourism_value.isnull().sum())
Missing values
Year 0
Tourism 0
dtype: int64
Year 0
Tourism 0
dtype: int64