bmy-share

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2024年10月14日

摘要: 源代码 import pandas as pd df = pd.read_csv("Titanic.csv") # 对Sex分组,用各组乘客的平均年龄填充各组中的缺失年龄 df_cleaned['Age'] = df_cleaned.groupby('Sex')['Age'].apply(lambd 阅读全文
posted @ 2024-10-14 23:14 lemonMINYU 阅读(72) 评论(0) 推荐(0)