transbigdata.id_reindex
- transbigdata.id_reindex(data, col, new=False, timegap=None, timecol=None, suffix='_new', sample=None)
Renumber the ID columns of the data
- 参数:
data (DataFrame) – Data
col (str) – Name of the ID column to be re-indexed
new (bool) – False: the new number of the same ID will be the same index; True: according to the order of the table, the origin ID appears again with different index
timegap (number) – If an individual does not appear for a period of time (timegap is the time threshold), it is numbered as a new individual. This parameter should be set with timecol to take effect.
timecol (str) – The column name of time, it should be set with timegap to take effect
suffix (str) – The suffix of the new column. When set to False, the former column will be replaced
sample (int (optional)) – To desampling the data
- 返回:
data1 – Renumbered data
- 返回类型:
DataFrame