Created
May 3, 2019 19:25
-
-
Save karamanbk/72a7848de3c3e3727b616941c2d223c1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# import libraries | |
from datetime import datetime, timedelta | |
import pandas as pd | |
%matplotlib inline | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import seaborn as sns | |
from __future__ import division | |
import plotly.plotly as py | |
import plotly.offline as pyoff | |
import plotly.graph_objs as go | |
#inititate Plotly | |
pyoff.init_notebook_mode() | |
#load our data from CSV | |
tx_data = pd.read_csv('data.csv') | |
#convert the string date field to datetime | |
tx_data['InvoiceDate'] = pd.to_datetime(tx_data['InvoiceDate']) | |
#we will be using only UK data | |
tx_uk = tx_data.query("Country=='United Kingdom'").reset_index(drop=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment