I have a csv file with below matrix like information. By giving it as a input in that there is a element -1
. I need a code to find the index of -1
. Please help me in this.
The below data is the csv file input to python:
答案 0 :(得分:0)
尝试一下:
import pandas as pd
csv = pd.read_csv(r'C:/.../file.csv', ';')
index = []
for i,r in csv.iterrows():
index.append(i)
print(index[-1])