Created
August 17, 2018 21:47
-
-
Save ericness/b4814c84046b696d5121e59d0ce8c7df to your computer and use it in GitHub Desktop.
Create a sample of order data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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