<jupyter_start><jupyter_text>Statistical Data Cleaning and Plotting for VETI dataVETI is Istanbul Technical University's statictical data collecting system. Sometimes we need to handle our data by ourself. VETI has this feature to export mass data. Here I'll clean and calculate my data and I will create my plot.<jupyter_code>import pandas as pd
# Readen excell file downloaded from VETI system.
df = pd.read_excel('comp-usag-surv_Report_2019_12_11.xlsx')
df.head(5)
# First we need to clean column names.
# Cloumn name renaming:
df=df.rename(columns={'Starting Date': 'date', '1. 1. Which computer do you mostly use in your room in the faculty?':'usage'})
df.head(5)
# Here is a good data cleaning source. I'll use it without any change.
# https://gist.github.com/susanli2016/10e8bae3dc7e30c1a3485d52313f4ccf#file-text_preprocessing-py
# Removing empty entrances. Simple but very important:
df = df[~df['usage'].isnull()]
# Convert datetime
# https://docs.python.org/3.4/library/datetime.html
df['date'] =  pd.to_datetime(df['date'], format='%m/%d/%Y %I:%M:%S %p')
df.head(5)
# What about removing unnecessary punctation?
df['usage'] = df['usage'].str[3:]
df.head(5)
# Here is the magic command. This will summarize data to show on graphic
df.groupby('usage').count()
# Here is the first graphic.
df.groupby('usage').count().plot(kind='bar')<jupyter_output><empty_output>