Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
VinceDayrit-initial_RESIT_project-/#Data Preprocessing Code.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
18 lines (14 sloc)
548 Bytes
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
#Data Preprocessing Code = | |
import numpy as np | |
import dask.dataframe as dd | |
import pandas as pd | |
#This part of the code loads datasets | |
df_full = pd.read_csv("Trips_Full Data.csv") | |
df = pd.read_csv("Trips_By_Distance.csv") | |
#This part of the code is responsible for data cleaning | |
df["Population staying at home"] = df["Population staying at home"].fillna(0) | |
#This Show types of columns and count non-null values | |
df.dtypes | |
df.notnull().sum().compute() | |
df.describe().compute() | |
df['Population staying at home'].describe().compute() |