Forum Discussion
The python scikit-learn method, SVM, fit causes the timeout (although the script works well in Jupyter notebook)
Hi kcwagi ,
- Difference between Power BI python and Jupyther notebooks:
The Power BI Python integration requires the installation of two Python packages:
- Pandas. A software library for data manipulation and analysis. It offers data structures and operations for manipulating numerical tables and time series. Your imported data must be in a pandas data frame. A data frame is a two-dimensional data structure. For example, data is aligned in a tabular fashion in rows and columns.
- Matplotlib. A plotting library for Python and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits, such as Tkinter, wxPython, Qt, or GTK+.
The notebook extends the console-based approach to interactive computing in a qualitatively new direction, providing a web-based application suitable for capturing the whole computation process: developing, documenting, and executing code, as well as communicating the results. The Jupyter notebook combines two components:
A web application: a browser-based tool for interactive authoring of documents which combine explanatory text, mathematics, computations and their rich media output.
Notebook documents: a representation of all content visible in the web application, including inputs and outputs of the computations, explanatory text, mathematics, images, and rich media representations of objects.
- You can refer these two official documents for more details:
- Based on your error message, the resaon that cause this scene is the script is over 30 minutes. When preparing and running a Python script in Power BI Desktop, there are a few limitations:
- Only pandas data frames are imported, so make sure the data you want to import to Power BI is represented in a data frame
- Any Python script that runs longer than 30 minutes times out
- Interactive calls in the Python script, such as waiting for user input, halts the script’s execution
- When setting the working directory within the Python script, you must define a full path to the working directory, rather than a relative path
- Nested tables are currently not supported
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.