raise KeyError(f"None of [{key}] are in the [{axis_name}]") KeyError: "None of [Index(['WindSpeed', 'Power', 'RotorSpeed'], dtype='object')] are in the [index]"
时间: 2024-01-20 21:03:11 浏览: 206
这个错误是由于你尝试访问DataFrame中不存在的列名所导致的。具体来说,代码中的data['WindSpeed']、data['Power']和data['RotorSpeed']这三个列名没有在DataFrame中找到,因此会引发KeyError异常。你可以使用DataFrame.columns()方法或DataFrame.head()方法来检查DataFrame的列名,并确保列名没有被错误拼写或重复定义。如果问题仍然存在,请提供更多上下文和代码以帮助我更好地理解问题。
阅读全文