---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-17-aabf48e01163> in <module>()
1 # difference between the last executed trade and the mid point between bid/ask
----> 2 diff = mid - trades['last']
3 diff = drop_dupe_index(diff).dropna()
/home/nak/PycharmProjects/activetickdata/lib/python3.5/site-packages/pandas/core/ops.py in wrapper(left, right, name, na_op)
599 else:
600 index, lidx, ridx = left.index.join(rindex, how='outer',
--> 601 return_indexers=True)
602
603 if lidx is not None:
/home/nak/PycharmProjects/activetickdata/lib/python3.5/site-packages/pandas/tseries/index.py in join(self, other, how, level, return_indexers)
1011 this, other = self._maybe_utc_convert(other)
1012 return Index.join(this, other, how=how, level=level,
-> 1013 return_indexers=return_indexers)
1014
1015 def _maybe_utc_convert(self, other):
/home/nak/PycharmProjects/activetickdata/lib/python3.5/site-packages/pandas/core/index.py in join(self, other, how, level, return_indexers)
2276 return self._join_non_unique(other, how=how,
2277 return_indexers=return_indexers)
-> 2278 elif not self.is_unique or not other.is_unique:
2279 if self.is_monotonic and other.is_monotonic:
2280 return self._join_monotonic(other, how=how,
pandas/src/properties.pyx in pandas.lib.cache_readonly.__get__ (pandas/lib.c:44341)()
/home/nak/PycharmProjects/activetickdata/lib/python3.5/site-packages/pandas/core/index.py in is_unique(self)
810 def is_unique(self):
811 """ return if the index has unique values """
--> 812 return self._engine.is_unique
813
814 @property
pandas/index.pyx in pandas.index.IndexEngine.is_unique.__get__ (pandas/index.c:4711)()
pandas/index.pyx in pandas.index.IndexEngine._do_unique_check (pandas/index.c:5305)()
pandas/index.pyx in pandas.index.IndexEngine._ensure_mapping_populated (pandas/index.c:5510)()
pandas/index.pyx in pandas.index.IndexEngine.initialize (pandas/index.c:5620)()
pandas/hashtable.pyx in pandas.hashtable.Int64HashTable.map_locations (pandas/hashtable.c:7191)()
/home/nak/PycharmProjects/activetickdata/lib/python3.5/site-packages/pandas/hashtable.cpython-35m-x86_64-linux-gnu.so in View.MemoryView.memoryview_cwrapper (pandas/hashtable.c:29636)()
/home/nak/PycharmProjects/activetickdata/lib/python3.5/site-packages/pandas/hashtable.cpython-35m-x86_64-linux-gnu.so in View.MemoryView.memoryview.__cinit__ (pandas/hashtable.c:26005)()
ValueError: buffer source array is read-only