Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Pandas – AttributeError: 'Series' object has no attribute 'upper'

I have this error and I don’t know how to solve it.

Here is my code :

time_start = data_h_df['hour']
frequency = data_h_df['FREQUENCY']
timezone = data_h_df['TIMEZONE']
outputMode = OutputMode('EEA',time_start, frequency, pytz.timezone(timezone),CONST_MODE_CONT,IDCase1())

When I don’t use variables but I put the values directly in parameters like this, I don’t have an error :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

outputMode = OutputMode('EEA','06:00:00','08:00:00',pytz.timezone('Europe/Paris'),CONST_MODE_CONT,IDCase1())

I don’t know if it can help, these columns have this form in the dataframe :

hour         FREQUENCY      TIMEZONE
06:00:00     08:00:00       Europe/Paris

>Solution :

Try

time_start = data_h_df['hour'][0]
frequency = data_h_df['FREQUENCY'][0]
timezone = data_h_df['TIMEZONE'][0]

Maybe it’s a type error from the Dataframe

Edit: You probably need all three lines, not only one.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading