airport | type of traffic | 2010-10-01 00:00:00 | 2010-11-01 00:00:00 | 2010-12-01 00:00:00 |
---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
import plotly.graph_objects as go | |
import plotly.express as px | |
from functions import replace_df_ax_name, find_missing_values, path_checker, df_location_data, missing_location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df = pd.read_csv("passenger_data.csv", delimiter=";", header=1).drop(["domestic/international flights", "passenger group"], axis=1) | |
df = df.sort_values(by="airport") | |
df.reset_index(drop=True, inplace=True) | |
df.head() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df = replace_df_ax_name(df, "Passengers ", "", 1) | |
df = replace_df_ax_name(df, "M", "-", 1) | |
df = replace_df_ax_name(df, "-", "d_to_datetime", 1) | |
df.head() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find_missing_values(df) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path = "df_geo.csv" | |
read = True | |
if read: | |
if path_checker(path): | |
df = pd.read_csv(path) | |
if "date" in df: | |
df["date"] = pd.to_datetime(df["date"]) | |
else: | |
if df is None: |
airport | type of traffic | 2010-10-01 00:00:00 | 2010-11-01 00:00:00 | 2010-12-01 00:00:00 |
---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
miss_only |
location | point | latitude | longitude | altitude |
---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
miss_col |