IIabm/analysis_count.py

9 lines
273 B
Python
Raw Permalink Normal View History

2023-05-15 10:42:16 +08:00
import pandas as pd
count = pd.read_csv("analysis\\count.csv", dtype={'s_id': str, 'id_firm': str})
print(count)
print(len(count['s_id'].unique()))
count_max_ts = count.groupby('s_id')['ts'].max()
print(count_max_ts.value_counts())
2023-07-09 15:38:49 +08:00
print(count_max_ts.value_counts()/1593)