Forum Discussion

ironboy0423's avatar
ironboy0423
Helper I
3 years ago
Solved

Python script in Power BI transform data/power query returns date as Microsoft.OleDb.Date

Hi, guys.

 

I am having issues when I use python script in transforming data. The date became unreadable? or Microsoft.OleDb.Date. May I know the most effective way to fix it? Here's my python script:

 

 

import pandas as pd

dataset = pd.DataFrame(data=data)

dataset['Supplier Name'] = dataset['Name'].str.replace(r'^.*-\s*', '').str.strip()

dataset.drop(columns=['Name'], inplace=True)

dataset.reset_index(drop=True, inplace=True)

 

  • Please consider this as resolved. I just did the step for changed type with local after running the python script:

     

     

2 Replies

  • Please consider this as resolved. I just did the step for changed type with local after running the python script:

     

     

    • Yogesh_BI's avatar
      Yogesh_BI
      Frequent Visitor

      Hi, 
      Facing similar issue in python script in Power query. where is option to change the type Locale?

      Thank you !!