Forum Discussion

sfmike99's avatar
sfmike99
Advocate II
7 years ago
Solved

Collecting data (not visual) outputs from Python

  I've been moving some basic Python visuals into Power BI which is amazing with the slicers:       Now I'm trying to add in some statistical analysis, and pass data / output back to the c...
  • LivioLanzo's avatar
    LivioLanzo
    7 years ago

    Hi sfmike99 

     

    when you open a  Query in the query editor you can choose Python script in the Transform tab (on the far right).

    The DataFrame passed to Python is named 'dataset' and it is the table of the preceding query step. You can apply transofmrations to this DataFrame within Python by inputting the code and after you click ok you will see different DataFrames available for expansion, normally here you'd expand only the dataframe you actually want to return. Let me know if you need me to post pictures which could make it more clear

  • LivioLanzo's avatar
    LivioLanzo
    7 years ago

    sfmike99  yes all the Drataframes should be visible after the script is run. You should have as many rows as dataframes created by your code. Normally then you'd filter by just the one you'd want to expand and then expand it