import pandas as pd
pd.set_option('display.width', 200) # widen the display to see more columns
import qgrid # Qgrid is an IPython extension which uses a javascript library called SlickGrid to render pandas DataFrames within an IPython notebook.
qgrid.nbinstall() # copies javascript dependencies to your /nbextensions folder
import sys
from PyQt4 import QtGui
app=QtGui.QApplication.instance()
if not app:
app = QtGui.QApplication(sys.argv)
file_path = str(QtGui.QFileDialog.getOpenFileName(filter = "CSV Files (*.csv)"))
df = pd.read_csv(file_path)
df.columns.values
array(['Calendar Month', 'Sales Rep Name', 'Product Line', '$ Sales'], dtype=object)
df
Calendar Month | Sales Rep Name | Product Line | $ Sales | |
---|---|---|---|---|
0 | 2013-M11 | Joe | 1A | 310.08 |
1 | 2013-M11 | Joe | 1A | 3264.05 |
2 | 2013-M11 | Joe | 1A | 24.38 |
3 | 2013-M11 | Jim | 1A | 256.58 |
4 | 2013-M11 | Jim | 1A | -7.03 |
5 | 2013-M11 | Jim | 1A | -74.00 |
6 | 2013-M11 | Joe | 1B | 882.00 |
7 | 2013-M11 | Joe | 1B | 1429.20 |
8 | 2013-M11 | Joe | 1B | 19584.00 |
9 | 2013-M11 | Joe | 1B | 20054.70 |
10 | 2013-M11 | Jim | 1B | 4960.80 |
11 | 2013-M11 | Jim | 1B | 225.43 |
12 | 2013-M11 | Jim | 1B | 2372.92 |
13 | 2013-M11 | Jim | 1B | 3031.20 |
qgrid.show_grid(df, remote_js = True)