我想在阅读代码时打开 csv 文件并将其反转,将日期替换为连续数字并将其保留在那里。
def s(a, b):
try:
if a==str(userInput) and b==int(userInput):
for line in reversed(list(open("AAPL.csv"))):
b=[0]
a=[]
for bin line:
count=1
b= count
count+=1
a=[]
a=['open', 'high', 'low', 'close', 'volume', 'adj_close']
a.lower()
except ValueError:
pass
return a, b
def main():
pass
我收到此错误:
Traceback (most recent call last):File "<pyshell#4>", line 1, in <module>test_date()
TypeError: test_date() missing 2 required positional arguments: 'col' and 'day'