Python Forum
Working with dataframes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with dataframes
#3
Line 2 seems particularly problematic.
First, remember that whitespace matters in Python. So, tighten up the code, get rid of the space between genes_mouse_human and the opening bracket in both places. However, that may not be the problem.
Recognize that where you have == the expression will resolve to True or False. I do not think that is what you want.
Look at the Pandas functions .loc and .iloc I think those will help you with finding values in your dataframe properly.
Reply


Messages In This Thread
finding items / rows in dataframe - by rotemkat - Aug-04-2021, 08:10 AM
RE: Working with dataframes - by jefsummers - Aug-04-2021, 11:24 AM
Working with dataframes - by rotemkat - Aug-04-2021, 09:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Merging two DataFrames based on indexes from two other DataFrames lucinda_rigeitti 0 1,771 Jan-16-2020, 08:36 PM
Last Post: lucinda_rigeitti

Forum Jump:

User Panel Messages

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