<jupyter_start><jupyter_text>Data Importation<jupyter_code>import pandas as pd
data = pd.read_csv('Sales_Data/Sales_January_2019.csv')
data.head(3)
data.tail()
import glob
dir(glob)
import pandas as pd
import glob

path = './Sales_Data/' # use your path
all_files = glob.glob(path + "/*.csv")

li = []

for filename in all_files:
    df = pd.read_csv(filename, index_col=None, header=0)
    li.append(df)

data = pd.concat(li, axis=0, ignore_index=True)
data.head()<jupyter_output><empty_output><jupyter_text>Data Cleaning<jupyter_code>data.isnull()
data.isnull().sum()
data.dropna(how = 'any', inplace = True)
data.shape
data.shape[0]
data['Product']
data [['Product', 'Quantity Ordered']]
data.head()
data['Order Date'] = pd.to_datetime(data['Order Date'], errors = 'coerce')
data.head()
data['Month'] = data ['Order Date'].dt.month
data.head()
data['Hour'] = data ['Order Date'].dt.hour
data.head()
data.isnull().sum()
data.dropna(how = 'any', inplace = True)
data.isnull().sum()<jupyter_output><empty_output><jupyter_text>Analysis<jupyter_code>data.head()
data['Sales'] = data ['Quantity Ordered'].astype('int')*data['Price Each'].astype('float')
data.head()
data.groupby('Month')['Sales'].sum()
import matplotlib.pyplot as plt<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18398096748612214, 'fraction_numerical': 0.006344171292624901, 'mean_word_length': 6.838509316770186, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '168312', 'license': 'MIT', 'n_tokens_mistral': 484, 'n_tokens_neox': 470, 'n_words': 89, 'path': '.ipynb_checkpoints/Exploratory data analysis-checkpoint.ipynb', 'repo_name': 'anthoniomadu/ISM_416', 'size': '1261'}