i: 0, n: 0, t: 47 val: 1
i: 100000, n: 2, t: 178726 val: 1
i: 200000, n: 4, t: 240413 val: 1
i: 300000, n: 5, t: 527838 val: 1
i: 400000, n: 8, t: 283563 val: 1
i: 500000, n: 9, t: 393596 val: 1
i: 600000, n: 11, t: 178986 val: 1
i: 700000, n: 12, t: 405658 val: 2
i: 800000, n: 14, t: 314449 val: 1
i: 900000, n: 17, t: 38608 val: 1
i: 1e+06, n: 19, t: 225897 val: 1
i: 1.1e+06, n: 21, t: 17616 val: 2
i: 1.2e+06, n: 22, t: 93686 val: 1
i: 1.3e+06, n: 24, t: 233465 val: 1
i: 1.4e+06, n: 26, t: 207808 val: 1
i: 1.5e+06, n: 28, t: 118499 val: 1
i: 1.6e+06, n: 30, t: 182113 val: 1
i: 1.7e+06, n: 32, t: 288557 val: 1
i: 1.8e+06, n: 35, t: 231627 val: 1
(1842227, 3)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/usr/local/opt/pyenv/versions/3.5.3/lib/python3.5/site-packages/pandas/core/internals.py in create_block_manager_from_blocks(blocks, axes)
4246 blocks = [make_block(values=blocks[0],
-> 4247 placement=slice(0, len(axes[0])))]
4248
/usr/local/opt/pyenv/versions/3.5.3/lib/python3.5/site-packages/pandas/core/internals.py in make_block(values, placement, klass, ndim, dtype, fastpath)
2684
-> 2685 return klass(values, ndim=ndim, fastpath=fastpath, placement=placement)
2686
/usr/local/opt/pyenv/versions/3.5.3/lib/python3.5/site-packages/pandas/core/internals.py in __init__(self, values, placement, ndim, fastpath)
108 'implies %d' % (len(self.values),
--> 109 len(self.mgr_locs)))
110
ValueError: Wrong number of items passed 3, placement implies 2
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-237-15bf210f9502> in <module>()
12 #for t in zip(np.arange(data.shape[1]):
13
---> 14 df = pd.DataFrame(final_data_np.astype(np.int32),columns=['time','nid'])
15 df
/usr/local/opt/pyenv/versions/3.5.3/lib/python3.5/site-packages/pandas/core/frame.py in __init__(self, data, index, columns, dtype, copy)
295 else:
296 mgr = self._init_ndarray(data, index, columns, dtype=dtype,
--> 297 copy=copy)
298 elif isinstance(data, (list, types.GeneratorType)):
299 if isinstance(data, types.GeneratorType):
/usr/local/opt/pyenv/versions/3.5.3/lib/python3.5/site-packages/pandas/core/frame.py in _init_ndarray(self, values, index, columns, dtype, copy)
472 values = _possibly_infer_to_datetimelike(values)
473
--> 474 return create_block_manager_from_blocks([values], [columns, index])
475
476 @property
/usr/local/opt/pyenv/versions/3.5.3/lib/python3.5/site-packages/pandas/core/internals.py in create_block_manager_from_blocks(blocks, axes)
4254 blocks = [getattr(b, 'values', b) for b in blocks]
4255 tot_items = sum(b.shape[0] for b in blocks)
-> 4256 construction_error(tot_items, blocks[0].shape[1:], axes, e)
4257
4258
/usr/local/opt/pyenv/versions/3.5.3/lib/python3.5/site-packages/pandas/core/internals.py in construction_error(tot_items, block_shape, axes, e)
4231 raise ValueError("Empty data passed with indices specified.")
4232 raise ValueError("Shape of passed values is {0}, indices imply {1}".format(
-> 4233 passed, implied))
4234
4235
ValueError: Shape of passed values is (3, 1842227), indices imply (2, 1842227)