Gmousse / dataframe-js

No Maintenance Intended
https://gmousse.gitbooks.io/dataframe-js/
MIT License
460 stars 38 forks source link

add index to the DataFrame #121

Open feiyu-london opened 3 years ago

feiyu-london commented 3 years ago

Sometimes I would need to assign an index to both existing dataframe and new dataframe (most likely 1:n series), so that these two dataframes can be joined together.

Also the existing dataframe might be updated through operations, so a new index might be required so that the updated dataframe can be properly searched and referenced.

In both cases, being able to add a new index (e.g. a series of 1:n) conveniently can be good.

The solution can be found in SQL operation - alter table [dataframe] add new column and assign int auto_increment.

Hope this makes sense.

Regards,

Fei from the U.K.