在 pandas 中合并两个 DataFrame 时出现 KeyError: 'user_id'
我有两个 DataFrame:
df_orders:订单信息df_users:用户信息
我想按 user_id 列把它们合并(merge),但 pandas 报错说找不到 user_id。
我确认过两个表里都有这一列,不知道为什么。
我有两个 DataFrame:
df_orders:订单信息
df_users:用户信息
我想按 user_id 列把它们合并(merge),但 pandas 报错说找不到 user_id。
我确认过两个表里都有这一列,不知道为什么。
We use cookies to ensure the best experience on our website. This includes analytics, personalization, and marketing purposes. Some cookies are essential for the website to function properly.
By clicking "Accept", you consent to our use of cookies. You can read more about how we use cookies and how you can change your preferences in our Privacy Policy.