Pandas dataframe and speed
问题 I have a pandas dataframe object which I have preallocated with 400 000 entries. 2 columns a timestamp of type datetime.datetime and a float number. When I attempt to insert (overwrite) a row in the table it seems rather slow, depending on the size of the table I get something like 0.044seconds. I have created an index of integer and I am using this index to access the row. Here is how I am using it: maxsize = 400000 data = pd.DataFrame({'ts' : date_list, 'val' : zeros}, index=range(maxsize))