uga-libraries / hub-audit

Compare the Digital Production Hub share contents to the inventory, to identifying information that needs updating.
Creative Commons Attribution Share Alike 4.0 International
0 stars 0 forks source link

FutureWarning: Setting an item of incompatible dtype #16

Open amhanson9 opened 2 months ago

amhanson9 commented 2 months ago

Warning from running the script August 2024

174: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value 'Missing' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. df.loc[pd.isna(df[column_name]), 'Audit_Required'] = 'Missing' 66: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value 'Expired' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. df_date.loc[df_date['Review_Date'] < today, 'Audit_Dates'] = 'Expired' 71: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value 'Review' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. df_nondate.loc[df_nondate['Review_Date'].str.lower() != 'permanent', 'Audit_Dates'] = 'Review' 144: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value 'Not in share' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. df.loc[df['_merge'] == 'left_only', 'Audit_Inventory'] = 'Not in share'