0

I have a table that I'm importing from a sharepoint list into my PBI report and I need to parse this into a HTML format to create some dynamic visuals, so python is my tool of choice to do this.

Is there a method to pass a given power-bi table into a pandas dataframe? if so can anyone show me how it's done?

is it done via the source editor or within the python editor?

say my table is called source_1

I assume it would be something like df = pd.read_[?]('\source_1')

Just to clarify all i want to do is pass a powerBI table into a pandas dataframe within the Python Script Editor : Example

Umar.H
  • 22,559
  • 7
  • 39
  • 74
  • 1
    If I understand you correctly, you want to have a table from Power BI as a pandas dataframe. You can use `python` in Power BI, simply do that and then use [`df.to_html`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_html.html) to return it as an HTML object. – Erfan Oct 28 '19 at 15:56
  • @Erfan youv'e gone one step to far, I have a table that I want to pass into a pandas dataframe, once that's done I know what to do as I've written the code in my juypter nb. just need to pass my variables into the pandas dataframe objects. – Umar.H Oct 28 '19 at 15:57
  • 1
    @Datanovice If you're still having some problems after reading the linked post above, I'd be happy to discuss the issue further in a chat session. – vestland Oct 29 '19 at 12:37
  • 1
    @vestland that's very kind of you, I've not yet implemented your solution but read it a few times and it seems to mimic my problem pretty well. If I need any additonal help I'll ask here. Thanks for your post my man. – Umar.H Oct 29 '19 at 18:48
  • 1
    @Datanovice [This post](https://stackoverflow.com/questions/58457137/how-to-make-a-reproducible-data-sample-in-powerbi-using-python) has a few interesting points regarding pandas, python and tables in PowerBI as well. – vestland Oct 29 '19 at 18:59

0 Answers0