Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个记录很少的 csv 文件:
如果有 1 行,则函数计数正确。但是,如果我添加其他记录(如图所示),我会遇到错误:
我怎样才能避免它?
这是我的代码:
data = pd.read_csv (r'C:\Users\KLSAJDo\Desktop\Projekt.csv') p = [(data['x_start']), (data['y_start'])] q = [(data['x_end']), (data['y_end'])] print (math.dist(p, q))