Skip to content

Instantly share code, notes, and snippets.

@isauravmanitripathi
Created October 10, 2022 15:36
Show Gist options
  • Save isauravmanitripathi/2583e6dcf1264295be976876d1f4670d to your computer and use it in GitHub Desktop.
Save isauravmanitripathi/2583e6dcf1264295be976876d1f4670d to your computer and use it in GitHub Desktop.
# PRELIMINARY OPERATIONS
data = pd.read_excel("./data_original.xlsx")
data = data.drop(columns=["fix_port","source", "age_youngest", "gender", "injury_desc", "report", "notes", "mechanical", "op_error", "employee"])
data = data.dropna()
data = data[data["bus_type"]=="Amusement park"]
data = data[data["industry_sector"]=="amusement ride"]
data = data[data["manufacturer"] != "In-house"]
data = data.drop(columns=["bus_type", "industry_sector"])
data.reset_index(inplace=True)
data.drop(columns="index", inplace=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment