计算一系列TASM的总和

问题描述

我尝试计算4n ^ 2,其中n [1..10]。这是我的代码,但我不明白为什么结果未在控制台中打印。我尝试使用ShowUInt16进行测试,但没有,但结果只是1540年出现黑屏

import pandas as pd
df = pd.read_html(
    "https://fxtop.com/en/historical-exchange-rates.php?A=1&C1=USD&C2=IDR&MA=1&DD1=01&MM1=09&YYYY1=1995&B=1&P=&I=1&DD2=23&MM2=09&YYYY2=2020&btnOK=Go%21",header=0)[-3]
df['Month'] = pd.to_datetime(df["Month"])
df = df.iloc[::-1].reset_index(drop=True)
df.columns = ['month','average','min','max','nb_working_days']
df.to_csv("data_usd.csv",index=False)
df = pd.read_csv("data_usd.csv")


indexes_to_drop = []

for index,row in df.iterrows():
    if row.month.split("-")[1] != '10':
        indexes_to_drop.append(index)

df.drop(index=indexes_to_drop,inplace = True)

pd.set_option('display.max_rows',df.shape[0]+1)

print(df)

C ++类比代码,请求解此方程

import pandas as pd
import datetime

dt = datetime.datetime.today()


df = pd.read_html(
    f"https://fxtop.com/en/historical-exchange-rates.php?A=1&C1=USD&C2=IDR&MA=1&DD1=01&MM1={dt.month}&YYYY1=1995&B=1&P=&I=1&DD2=23&MM2={dt.month}&YYYY2={dt.year}&btnOK=Go%21",index=False)
df = pd.read_csv("data_usd.csv")


pd.set_option('display.max_rows',df.shape[0]+1)

print(df)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...