1
I have the following dataset:
Brand Condition Fuel
0 Toyota Used Diesel
1 Suzuki Used Petrol
2 Suzuki Used CNG
3 Suzuki Used Petrol
4 Toyota Used Petrol
It’s over 10,000 records and has over 15 brands. As I filter, for example, only the lines with Brand equal to Toyota?
I tried the following:
df1 = df.filter(items=['Brand','Fuel'], axis=1)
teste = df1.filter(like='Toyota', axis=0)
teste.head()
But he didn’t return anything.
See if that’s not what you want to do
result = df[ df['Brand'] == 'Toyota' ]
– Icaro Martins
Exactly that. Thank you, I was thinking the hardest way possible.
– hidantachi