代码如下。使用idxmax函数时,它不会给出输出。我怎么在这里错了?
import pandas as pd
pd.set_option('display.expand_frame_repr', False)
def get_max_close(symbol):
df = pd.read_csv("C:/Users/vicko/Desktop/CSV/{}.csv".format(symbol))
return df['Close'].idxmax(axis=None, skipna=True)
def test_run():
for symbol in ['NIFTY', 'CLZ2014']:
print ("Max Close")
print (symbol)
print (get_max_close(symbol))
if __name__== "__main__":
test_run()