Let's say I have a table named park
like below.
Lon Lat City
1 1 A
1 2 A
2 3 B
3 4 C
I want to grab the rows of City A only (the data frame with matching value of "A") so that it looks like below
Lon Lat City
1 1 A
1 2 A
How can I do this? Edit: I realized that the example in the first link works but on my data it does not work. Why would this happen?
(My actual data contains Japanese characters so I am used a simplified version above.)
What I tried and did NOT work:
isin
I followed this and this ran below but they both return empty
value_list = ["北海道"]
park[park.Prefecture.isin(value_list)] # returns empty
park.loc[park["Prefecture"].isin(["北海道"])] # returns empty
Screenshots