我对Python比较陌生,在做作业的时候,遇到了以下问题。
这是 tensorflow 和 panda 的新入门
zerlite_13X_error = pd.read_csv("zerlite_13x_error.csv", sep=",")
def preprocess_features(zerlite_13X_error):
"""Prepares input features from zerlite_13X_error
Args:
zerlite_13X_error: A Pandas DataFrame expected to contain data
Return:
A DataFrame that contains the features to be used for the model.
including synthetic features
"""
selected_features = zerlite_13X_error[
["Parameter 1",
"Parameter 2",
"Parameter 3",
"Parameter 4",
"Parameter 5",
"Parameter 6",
"Parameter 7",
"Parameter 8"]]
processed_features = selected_features.copy()
print(processed_features.head())
return processed_features
preprocess_features(zerlite_13X_error)
KeyError:“['Parameter 7', 'Parameter 8', 'Parameter 2', 'Parameter 3', 'Parameter 4', 'Parameter 5', 'Parameter 6'] not in index” in preprocess_features(zerlite_13X_error)
梦里花落0921
慕容708150
相关分类