I am relatively new to Python, and when I am doing homework, I met the following Problems.
This is for a new starter for tensorflow and 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)