Python Forum
conditionals based on data frame
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
conditionals based on data frame
#2
on line 40 AACounty['Year'] = AACounty['Year'].astype(float, errors = 'raise')
you convert AACounty['Year'] to a float

then on line 63 if AACounty['Year'] == "2020":
you try to compare to a string
Reply


Messages In This Thread
conditionals based on data frame - by mbrown009 - Aug-12-2022, 01:41 AM
RE: conditionals based on data frame - by Larz60+ - Aug-12-2022, 08:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how do you style data frame that has empty rows. gsaray101 0 555 Sep-08-2023, 05:20 PM
Last Post: gsaray101
Question Doubt about conditionals in Python. Carmazum 6 1,698 Apr-01-2023, 12:01 AM
Last Post: Carmazum
  Grouping Data based on 30% bracket purnima1 4 1,262 Mar-10-2023, 07:38 PM
Last Post: deanhystad
  googletrans library to translate text language for using data frame is not running gcozba2023 0 1,294 Mar-06-2023, 09:50 AM
Last Post: gcozba2023
  Load multiple Jason data in one Data Frame vijays3 6 1,647 Aug-12-2022, 05:17 PM
Last Post: vijays3
  I have written a program that outputs data based on GPS signal kalle 1 1,233 Jul-22-2022, 12:10 AM
Last Post: mcmxl22
Question Change elements of array based on position of input data Cola_Reb 6 2,221 May-13-2022, 12:57 PM
Last Post: Cola_Reb
  Efficiency with regard to nested conditionals or and statements Mark17 13 3,326 May-06-2022, 05:16 PM
Last Post: Mark17
  Merging two Data Frame on a special case piku9290dgp 0 1,117 Mar-02-2022, 10:43 AM
Last Post: piku9290dgp
  Nested conditionals vs conditionals connected by operators dboxall123 8 3,175 Feb-18-2022, 09:34 PM
Last Post: dboxall123

Forum Jump:

User Panel Messages

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