The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Python
 AttributeError: 'DataFrame' object has no attribut

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
syxz0628 Posted - 04/25/2023 : 09:00:55 AM
Origin Ver. and Service Release (Select Help-->About Origin): Origin2022
Operating System:Windows
I got this error message when I simply use the command:
dfall = wksall.to_df()

AttributeError: 'DataFrame' object has no attribute

Looks like "iteritems" was removed in pandas 2.0.

Problem can be solved by installing pandas 1.5.
However, I am wondering if there is other solutions in the future.
2   L A T E S T    R E P L I E S    (Newest First)
murray3 Posted - 01/26/2024 : 04:25:38 AM
quote:
Originally posted by syxz0628

Origin Ver. and Service Release (Select Help-->About Origin): Origin2022
Operating System:Windows
I got this error message when I simply use the command:
dfall = wksall.to_df()

AttributeError: 'DataFrame' object has no attribute

Looks like "iteritems" was removed in pandas 2.0.

Problem can be solved by installing pandas 1.5.
However, I am wondering if there is other solutions in the future.



In this case, the 'iteritems' attribute is typically used to iterate over columns in a DataFrame. In pandas 2.0 and later versions, the preferred method for iterating over columns is to use the 'items()' method. Here's an example of how you can modify your code to work with the latest version of pandas:

dfall = wksall.to_df()
for column_name, column_data in dfall.items():
# Do something with each column
print(column_name, column_data)
By using the 'items()' method, you can iterate over the columns of the DataFrame and access both the column names and the corresponding data. This approach will ensure compatibility with future versions of pandas.
minimax Posted - 04/25/2023 : 10:08:06 AM
please update originpro package to the latest v1.1.6

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000