[英]Python Script to fill specific column on Power Bi
Is there a way on Power Bi to populate a specific column with values using a Python Script ? Power Bi 有没有办法使用 Python 脚本填充特定列的值? For example, I want to calculate the number of days between the start date and end date in this table:
例如,我想计算此表中开始日期和结束日期之间的天数:
.
.
Run Python Script
Run Python Script
OK
OK
Code:代码:
import pandas as pd
df['Remaining Days'] = pd.to_datetime( df['Contract End Date']) - pd.to_datetime(df['Contract Start Date'])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.