对如何存储、访问和 mege dfs.c df 列具有相同的标题名称感到困惑。代码如下:
for s in range(40):
# a func which returns historical business dates
ago_Ybd_0=
(date_by_adding_business_days(datetime.date(2020,7,17),s,Holiday))
year_0, month_0, day_0 = ago_Ybd_0.strftime("%Y-%b-%d").split("-")
month_0 = month_0.upper()
#import / unzip/ read file
!wget
'https://www.ukp.com/content/historical/{year_0}/{month_0}/cm{day_0}
{month_0}{year_0}kp.csv.zip'
!unzip 'uk{day_0}{month_0}{year_0}kp.csv.zip'
a_0=f'uk{day_0}{month_0}{year_0}kp.csv.zip'
# problem area
c=f'uk{day_0}{month_0}{year_0}'
c = pd.read_csv(a_0,engine='python')
# merge
eod_a=c.merge(c,on='SYSTEM',how='left')
慕盖茨4494581
相关分类