Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created September 27, 2021 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/27250f601226d4a199c17d9edb519905 to your computer and use it in GitHub Desktop.
Save amankharwal/27250f601226d4a199c17d9edb519905 to your computer and use it in GitHub Desktop.
data["Discount"] = data["Discount"].map({"No": 0, "Yes": 1})
data["Store_Type"] = data["Store_Type"].map({"S1": 1, "S2": 2, "S3": 3, "S4": 4})
data["Location_Type"] = data["Location_Type"].map({"L1": 1, "L2": 2, "L3": 3, "L4": 4, "L5": 5})
data.dropna()
x = np.array(data[["Store_Type", "Location_Type", "Holiday", "Discount"]])
y = np.array(data["#Order"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment