Forum Discussion
Create multiple Tables from Python
- Anonymous4 years ago
Hi,
I'm not sure is this thread still relevant. I had the same issue and I solved this by associating each data frame to a unique global variable:
for file in blobs: file_path = "...." with fs.open(file_path) as f: globals()[f"{file.name}"] = pd.read_csv(f) print(globals()[f"{file.name}"])
Hi Anonymous ,
How about filter table name to seperate them one by one after you have loaded all to Power bi?
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
- Anonymous4 years agoNot applicable
Not sure what you mean...it's the loading them to Power BI part that I have a problem with...
I can only see one table in Power Query, I want to have a list of all the tables representing the files that are in the GCS Bucket...
- v-kelly-msft4 years ago
Community Support
Hi Anonymous ,
Sorry for the misunderstanding.
Are the python statements full?Have you defined "blobs" first?
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
- Anonymous4 years agoNot applicable
Yes 'blobs' is defined first....I didn't post all the python....
Like I said, it works fine in PyCharm in that it prints each file name and then the contents.
But when I use this script in Power Query I just get a table for the last iteration of the loop...I would like to see a table for each of the three files in GCS if that's possible?