#Load in a tool that makes it easy to load in a datafile import pandas as pd #Load in some data from a file rawdata=pd.read_csv('dummy.csv') rawdata #Use the itable package to help us style the output of a data table #!pip3 install itable from itable import * PrettyTable(rawdata, tstyle=TableStyle(theme="theme1")) #Load in a toolkit that helps us generate charts from ggplot import * #Create a chart object associated with the data #For a simple chart, just map the names of selected data columns onto the chart axes we want to display them on g=ggplot(rawdata,aes(x='x val',y='y val')) #We can now say what sort of chart we want to generate from the chart object #For example, a line chart g + geom_line() #Or a scatterplot g + geom_point() #We can also annotate the chart in a textual way labelled_chart = g + geom_line() \ + ggtitle("The title of my chart") \ + xlab("Updated x-axis label") \ + ylab("Updated y-axis label") labelled_chart labelled_chart + theme_bw() labelled_chart + theme_538() #We can firther annotate the chart if required - for example, setting axis limits labelled_chart + theme_seaborn() + xlim(0,6) + ylim(0,15) labelled_chart + theme_seaborn() + xlim(0,6) + ylim(0,15) \ + geom_point(aes(color='red',size=50)) #The mpld3 utility can generate HTML charts from chart objects import mpld3 #All the charts we generate from now on will be interactive HTML charts mpld3.enable_notebook() g + geom_point() #If you hover over the chart, you should notice a popup menus appear in the to the bootom left of the chart. #Click on the magnifying glass and you can select an area of the chart to zoom inot #Click on the large + icon to drag the chart around. #Click on the house/home symbol to reset the chart labelled_chart