Skip to content

Instantly share code, notes, and snippets.

@cordon-thiago
Last active December 1, 2019 22:14
Show Gist options
  • Save cordon-thiago/eca5ffbee4fcd7d0f8e438fd93021f4b to your computer and use it in GitHub Desktop.
Save cordon-thiago/eca5ffbee4fcd7d0f8e438fd93021f4b to your computer and use it in GitHub Desktop.
Import CSV and remove rows with predictor variable missing.
# Import libraries
import pandas as pd
import numpy as np
from functions import aux_functions
hardbounce = pd.read_csv('datasets/hardbounce_sample.csv',sep=';')
# Run the function on dataset
aux_functions.percMissing(hardbounce)
# Make new dataframe removing flgHardBounce missing
hardbounce_2 = hardbounce[hardbounce['flgHardBounce'].notnull()].copy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment