Reputation: 135
I am trying to create a new dataframe object from an existing dataset that contains multiple similar columns that start with "shape_" I am trying to use the wildcard (*) but I am getting an error.
new_df = df[['date', 'lat', 'long', 'shape_*']]
from all the examples I have seen this should work but I am getting the error:
KeyError: "['shape_*'] not in index"
Upvotes: 1
Views: 295