I work with a file frame from a machine that samples every 2 milliseconds, so all row indices were reindexed to machine timestamps. There are certain TTL events that can occur at any interval accurate to the millisecond, so it is possible that TTL can occur with an odd number of milliseconds.
To simulate this, I created the following DataFrame:
import pandas as pd
df = pd.DataFrame({'x': xrange(10), 'y': xrange(10)})
df = df.ix[2::2]
df['events'] = ''
Now the DataFrame looks like this:
x y events
2 2 2 NaN
4 4 4 NaN
6 6 6 NaN
8 8 8 NaN
[4 rows x 3 columns]
Now I want to insert an odd ttl index, so I use DataFrame.loc:
df.loc[3, 'events'] = 'kowabunga!'
I get the following:
x y events
2 2 2 NaN
4 4 4 NaN
6 6 6 NaN
8 8 8 NaN
3 NaN NaN kowabunga!
[5 rows x 3 columns]
, ( ) . "kowabunga" , 2 4?
!