<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Multiple dataframes in python visual in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Multiple-dataframes-in-python-visual/m-p/2146492#M32496</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous,&lt;/P&gt;
&lt;P&gt;A limitation of visuals (core, custom, R, Python or otherwise) is that they can only execute a single DAX query , and therefore only contain a single dataset, so it is not possible to use two independent data frames. The only way around this might be to to combine all the data as a single dataset and then process into independent data frames accordingly before you start doing your main body of work.&lt;/P&gt;
&lt;P&gt;The boilerplate code is a series of comments informing you what pre-processing Power BI does to the dataset prior to the point where you add your code, as well as how to access the visual data (i.e. though the named dataset variable). If this were missing and you had not read the relevant documentation then it might not be clear how to proceed withough seeking information elsewhere. It's basically a succinct version of &lt;A href="https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals#known-limitations" target="_self"&gt;this section of the doc&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;As you select or remove fields, supporting code in the Python script editor is automatically generated or removed.&lt;/P&gt;
&lt;P&gt;Based on your selections, the Python script editor generates the following binding code.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The editor created a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;dataset&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;dataframe, with the fields you added.&lt;/LI&gt;
&lt;LI&gt;The default aggregation is:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;do not summarize&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI&gt;Similar to table visuals, fields are grouped and duplicate rows appear only once.&lt;/LI&gt;
&lt;/UL&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Wed, 20 Oct 2021 18:56:56 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2021-10-20T18:56:56Z</dc:date>
    <item>
      <title>Multiple dataframes in python visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multiple-dataframes-in-python-visual/m-p/2145689#M32490</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I can't find any documentation on importing multiple dataframes into a python visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By default the python visual places all selected dimensions and measures together:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;#dataset = pandas.DataFrame(dimension, measure, dimension2,measure2, dimension3, etc... )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I would like to import two separate dataframes so that each is evaluated indipendently from the other.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;#dataset = pandas.DataFrame(dimension, measure )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;#dataset2 = pandas.DataFrame(dimension2,measure2 )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I would then do some pandas transformation, merge them together and plot.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How do I do that?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Also question: w&lt;/SPAN&gt;&lt;SPAN&gt;hy is the initial boilerplate commented out?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I can't understand how powerbi interprets that code since it's commented out.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Oct 2021 12:46:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multiple-dataframes-in-python-visual/m-p/2145689#M32490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-20T12:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dataframes in python visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multiple-dataframes-in-python-visual/m-p/2146492#M32496</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous,&lt;/P&gt;
&lt;P&gt;A limitation of visuals (core, custom, R, Python or otherwise) is that they can only execute a single DAX query , and therefore only contain a single dataset, so it is not possible to use two independent data frames. The only way around this might be to to combine all the data as a single dataset and then process into independent data frames accordingly before you start doing your main body of work.&lt;/P&gt;
&lt;P&gt;The boilerplate code is a series of comments informing you what pre-processing Power BI does to the dataset prior to the point where you add your code, as well as how to access the visual data (i.e. though the named dataset variable). If this were missing and you had not read the relevant documentation then it might not be clear how to proceed withough seeking information elsewhere. It's basically a succinct version of &lt;A href="https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals#known-limitations" target="_self"&gt;this section of the doc&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;As you select or remove fields, supporting code in the Python script editor is automatically generated or removed.&lt;/P&gt;
&lt;P&gt;Based on your selections, the Python script editor generates the following binding code.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The editor created a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;dataset&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;dataframe, with the fields you added.&lt;/LI&gt;
&lt;LI&gt;The default aggregation is:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;do not summarize&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI&gt;Similar to table visuals, fields are grouped and duplicate rows appear only once.&lt;/LI&gt;
&lt;/UL&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 18:56:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multiple-dataframes-in-python-visual/m-p/2146492#M32496</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2021-10-20T18:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dataframes in python visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multiple-dataframes-in-python-visual/m-p/2147551#M32511</link>
      <description>&lt;P&gt;Thank you Daniel&lt;/P&gt;&lt;P&gt;I was hoping the boilerplate would get executed at some point internally so I was trying to force two dataframes in it but now I understand it's really just documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I'm back to square one&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 08:10:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multiple-dataframes-in-python-visual/m-p/2147551#M32511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-21T08:10:10Z</dc:date>
    </item>
  </channel>
</rss>

