generate functionThu, 30 Mar 2023

given two dataframes calculate the absolute and relative error of mean values of the columns "NEVs" and "MWhT" grouped by the columns "time" and "Volt" of both dataframes

def absolute_and_relative_error(dataframe_a, dataframe_b): absolut_error = (dataframe_a - dataframe_b).abs() relative_error = absolut_error.divide(dataframe_a) return absolut_error, relative_error absolute_and_relative_error(df_1, df_2)

Questions about programming?Chat with your personal AI assistant