Forum Discussion
Python integration error
- Anonymous4 years ago
Hi Anonymous ,
//note:You'll need to have the pandas library installed in your Python environment for the previous script code to work properly. To install pandas, run the following command in your Python installation: | > pip install pandas
Please install the pandas library and restart your computer and try again.
# 'dataset' holds the input data for this script import pandas as pd completedData = dataset.fillna(method='backfill', inplace=False) dataset["completedValues"] = completedData["SMI missing values"]How To Install Pandas In Python? An Easy Step By Step Multimedia Guide
My environment at the time of testing.
python 3.10
Desktop Version: 2.106.883.0 64-bit (June 2022)
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
I have a similar error, I am trying to run the code on the data imported from Azure Blob Containter. In my case however it is not the indent, have you ever encoutered this one:
DataSource.Error: ADO.NET: A problem occurred while processing your Python script.
Here are the technical details: [Expression.Error] We couldn't parse the input provided as a Time value.
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=A problem occurred while processing your Python script.
Here are the technical details: [Expression.Error] We couldn't parse the input provided as a Time value.
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonUnexpectedException
I cannot install Anaconda, because I am using this for work in a large company and there is no budget allocated to Anaconda licenses.
P.S. Privacy level is set to Public everywhere.
P.P.S. The Python PATH looks correct.
I was able to fix the error, it has to do with the wrong automatic datatype parsing by Power BI.