The process of preprocessing data in python.
total = pop[(pop.ages=='total') & (pop.state/region == 'USA')]
The age of the population is total Filter if the residential area of the population is USA.
in pop.state/region Read up to state and show the following error:
AttributeError: 'DataFrame' object has no attribute 'state'
I don't think / is recognized as part of the variable name, how do I handle it?
python dataframe filtering
according to how the implementation of and what is the prototype of the pop not or may be
.pop['state/region']
Shouldn't we approach it like this?
© 2024 OneMinuteCode. All rights reserved.