Forum Discussion
Python - multiple tables
- 7 years ago
Hi cyborgdroid,
Tables in power query can be recongnized as pandas object directly, so you can simply call other tables by calling relevant pandas object. You can refer to this answer: https://stackoverflow.com/questions/51947441/power-bi-using-python-on-multiple-tables-in-the-query-editor/51947461.
Regards,
Jimmy Tao
Hi cyborgdroid,
Tables in power query can be recongnized as pandas object directly, so you can simply call other tables by calling relevant pandas object. You can refer to this answer: https://stackoverflow.com/questions/51947441/power-bi-using-python-on-multiple-tables-in-the-query-editor/51947461.
Regards,
Jimmy Tao
- Anonymous7 years agoNot applicable
That was a great SO-answer. Something similar should be added to the docs!
- Curtly7 years agoNew Member
I tried this solution and it worked on my laptop, I tried it on a desktop and got the error below when I reference table 1 and 2 so it can be available in my codes:
DataSource.Error: ADO.NET: A problem occurred while processing your Python script.
Here are the technical details: [Expression.Error] The key didn't match any rows in the table.
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=A problem occurred while processing your Python script.
Here are the technical details: [Expression.Error] The key didn't match any rows in the table.
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonUnexpectedException