Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pandas Help
#10
(Apr-24-2020, 07:12 PM)cliffordhubbard Wrote:
# The Mojave Desert states
canu = ["California", "Arizona", "Nevada", "Utah"]
import pandas as pd
# Filter for rows in the Mojave Desert states
mojave_homelessness = homelessness["state"].isin(['canu'])
# See the result
print(mojave_homelessness)
Did you call .isin() with the correct argument?

# The Mojave Desert states
canu = ["California", "Arizona", "Nevada", "Utah"]

# Filter for rows in the Mojave Desert states
mojave_homelessness = homelessness[homelessness["state"].isin(canu)]

# See the result
print(mojave_homelessness)
Reply


Messages In This Thread
Python help... - by cliffordhubbard - Apr-24-2020, 07:12 PM
RE: Pandas Help - by micseydel - Apr-27-2020, 10:54 PM
RE: Pandas Help - by mirai - Jun-05-2020, 05:16 AM
RE: Python help... - by brianwoong - Dec-05-2020, 06:33 AM
RE: Python help... - by Jeff900 - Apr-24-2020, 07:36 PM
RE: Python help... - by cliffordhubbard - Apr-24-2020, 08:37 PM
RE: Python help... - by Jeff900 - Apr-24-2020, 08:48 PM
RE: Python help... - by deanhystad - Apr-24-2020, 09:28 PM
RE: Python help... - by cliffordhubbard - Apr-27-2020, 12:15 PM
Pandas Help - by cliffordhubbard - Apr-27-2020, 07:02 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020