In [1]:
import random
import numpy as np
import pandas as pd
import tensorflow as tf
import matplotlib.pyplot as plt
%matplotlib inline
plt.rcParams['figure.figsize'] = (10.0, 8.0) # set default size of plots

# for auto-reloading extenrnal modules
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2

In [21]:
ev = pd.read_csv("../data/event_type.csv",index_col="id")
re = pd.read_csv("../data/resource_type.csv",index_col="id")
log =  pd.read_csv("../data/log_feature.csv",index_col="id")
se = pd.read_csv("../data/severity_type.csv",index_col="id")
tr = pd.read_csv("../data/train.csv",index_col="id")
te = pd.read_csv("../data/test.csv",index_col="id")

In [22]:
ev.join(re).join(se).head()


Out[22]:
event_type resource_type severity_type
id
1 event_type 11 resource_type 8 severity_type 1
1 event_type 11 resource_type 6 severity_type 1
1 event_type 13 resource_type 8 severity_type 1
1 event_type 13 resource_type 6 severity_type 1
2 event_type 35 resource_type 2 severity_type 2

5 rows × 3 columns


In [28]:
ev.plot()


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-28-bb7fe1da6cc2> in <module>()
----> 1 ev.plot()

/usr/lib/python2.7/dist-packages/pandas/tools/plotting.pyc in plot_frame(frame, x, y, subplots, sharex, sharey, use_index, figsize, grid, legend, rot, ax, style, title, xlim, ylim, logx, logy, xticks, yticks, kind, sort_columns, fontsize, secondary_y, **kwds)
   1733                              secondary_y=secondary_y, **kwds)
   1734 
-> 1735     plot_obj.generate()
   1736     plot_obj.draw()
   1737     if subplots:

/usr/lib/python2.7/dist-packages/pandas/tools/plotting.pyc in generate(self)
    901     def generate(self):
    902         self._args_adjust()
--> 903         self._compute_plot_data()
    904         self._setup_subplots()
    905         self._make_plot()

/usr/lib/python2.7/dist-packages/pandas/tools/plotting.pyc in _compute_plot_data(self)
    982         if is_empty:
    983             raise TypeError('Empty {0!r}: no numeric data to '
--> 984                             'plot'.format(numeric_data.__class__.__name__))
    985 
    986         self.data = numeric_data

TypeError: Empty 'DataFrame': no numeric data to plot

In [ ]: