tave-st commited on
Commit
66cc316
1 Parent(s): 2571300

change date range

Browse files
Files changed (1) hide show
  1. utils.py +4 -2
utils.py CHANGED
@@ -16,8 +16,10 @@ def load_and_preprocess_data():
16
  # but to keep things simple it quite good.
17
  df = df[df["Quantity"] > 0]
18
 
19
- # Parse the date column
20
- df["InvoiceDate"] = pd.to_datetime(df["InvoiceDate"]).dt.floor("d")
 
 
21
 
22
  # Change customer id to int
23
  df["CustomerID"] = df["CustomerID"].astype(int)
 
16
  # but to keep things simple it quite good.
17
  df = df[df["Quantity"] > 0]
18
 
19
+ # Parse the date column and add 10 years, just to better visualization
20
+ df["InvoiceDate"] = pd.to_datetime(df["InvoiceDate"]).dt.floor(
21
+ "d"
22
+ ) + pd.offsets.DateOffset(years=10)
23
 
24
  # Change customer id to int
25
  df["CustomerID"] = df["CustomerID"].astype(int)