Skip to content

Instantly share code, notes, and snippets.

@ericness
Created August 17, 2018 21:47
Show Gist options
  • Save ericness/b4814c84046b696d5121e59d0ce8c7df to your computer and use it in GitHub Desktop.
Save ericness/b4814c84046b696d5121e59d0ce8c7df to your computer and use it in GitHub Desktop.
Create a sample of order data
from datetime import datetime
import pandas as pd
orders = pd.DataFrame(
data={
'customer': [1, 2, 3, 2, 3, 1, 1],
'order_date': [
datetime(2018, 1, 3),
datetime(2018, 1, 5),
datetime(2018, 1, 7),
datetime(2018, 1, 8),
datetime(2018, 1, 9),
datetime(2018, 1, 10),
datetime(2018, 1, 10)
],
'amount': [25, 42, 116, 21, 83, 4, 67]
}
)
print(orders)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment