pandas两列数据相除
时间: 2023-08-29 19:13:24 浏览: 241
Pandas实现一列数据分隔为两列
Sure, I can help you with pandas! To divide two columns in pandas, you can simply use the "/" operator between the two columns. Here's an example:
```
import pandas as pd
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
df['C'] = df['A'] / df['B']
print(df)
```
This will create a new column "C" in the dataframe containing the result of "A" divided by "B". Let me know if you have any further questions!
阅读全文