当我试图在jupyter笔记本中运行以下命令时,在规范化数据方面出现了一个问题。代码下面是我收到的错误信息。你知道吗
代码:
groupByGender_df = purchase_data_df.groupby([‘Gender’])
gender = purchase_data_df[“Gender”].value_counts()
groupByGender_df[“Price”].sum(),
“Normalized Price”: groupByGender_df[“Price”].mean().value_counts(normalize=True)})
summaryTable.head()
错误消息:
RuntimeWarning: ‘<’ not supported between instances of ‘str’ and ‘float’, sort order is undefined for incomparable objects
result = result.union(other)
RuntimeWarning: ‘<’ not supported between instances of ‘float’ and ‘str’, sort order is undefined for incomparable objects
index = _union_indexes(indexes)
我认为这与我试图组合两个数据帧有关?但我不确定。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐