<?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>Question Re: Python code error in dataflow in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116620#M4915672</link>
    <description>&lt;P&gt;probably there is a typo related with tabs&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def transform(data):
    specific_name = ['Male']
    df = data[data['gender'].isin(specific_name)]
    return df&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 02 Jun 2025 10:19:55 GMT</pubDate>
    <dc:creator>XaviPolo</dc:creator>
    <dc:date>2025-06-02T10:19:55Z</dc:date>
    <item>
      <title>Python code error in dataflow</title>
      <link>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaq-p/14116190</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm very new to python, I hvae a data set with 13 column , once of the called 'gender'. I want to filter the data and result moved to Target table.&lt;/P&gt;&lt;P&gt;However I'm getting below error message called "&lt;SPAN&gt;'method' object is not subscriptable"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Edula_0-1748779691290.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/268261iFC37B5ACEF83829D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Edula_0-1748779691290.png" alt="Edula_0-1748779691290.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please my code below, unfortunatly we can't debug the code in datasphere&lt;/P&gt;&lt;P&gt;def transform(data):&lt;BR /&gt;specific_name = ['Male']&lt;BR /&gt;df = data['gender'].isin[('specific_name')]&lt;BR /&gt;#data[NV]&lt;BR /&gt;return df&lt;/P&gt;&lt;P&gt;Any input would be greatly appreciated&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Hari&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jun 2025 12:12:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaq-p/14116190</guid>
      <dc:creator>Edula</dc:creator>
      <dc:date>2025-06-01T12:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python code error in dataflow</title>
      <link>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116547#M4915655</link>
      <description>&lt;P&gt;I believe there's a typo in your code, the isin function should be followed by parentheses () instead of brackets []&lt;BR /&gt;Like:&amp;nbsp;df = data[data['gender'].isin(specific_name)]&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 08:53:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116547#M4915655</guid>
      <dc:creator>XaviPolo</dc:creator>
      <dc:date>2025-06-02T08:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python code error in dataflow</title>
      <link>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116587#M4915664</link>
      <description>&lt;P&gt;Hi XaviPolo&lt;/P&gt;&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;I have modified the code as you mentioend,however I'm still getting a syntax error as below.&lt;/P&gt;&lt;P&gt;def transform(data)&lt;BR /&gt;specific_name = ['Male']&lt;BR /&gt;df = data[data['gender'].isin(specific_name)]&lt;BR /&gt;return df&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Edula_0-1748857287478.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/268408i27AAA5BE0F9AEF5A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Edula_0-1748857287478.png" alt="Edula_0-1748857287478.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 09:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116587#M4915664</guid>
      <dc:creator>Edula</dc:creator>
      <dc:date>2025-06-02T09:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python code error in dataflow</title>
      <link>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116620#M4915672</link>
      <description>&lt;P&gt;probably there is a typo related with tabs&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def transform(data):
    specific_name = ['Male']
    df = data[data['gender'].isin(specific_name)]
    return df&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 02 Jun 2025 10:19:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116620#M4915672</guid>
      <dc:creator>XaviPolo</dc:creator>
      <dc:date>2025-06-02T10:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Python code error in dataflow</title>
      <link>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116624#M4915675</link>
      <description>Hi XaviPolo, The same code works in python notebooks or google colabs , but not in Datashpere . I hope that those "isin" functions not available yet in Datasphere.I can't write "import pandas " in datasphere.</description>
      <pubDate>Mon, 02 Jun 2025 10:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116624#M4915675</guid>
      <dc:creator>Edula</dc:creator>
      <dc:date>2025-06-02T10:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python code error in dataflow</title>
      <link>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116663#M4915681</link>
      <description>&lt;P&gt;the previous code works for me.&lt;BR /&gt;check that you don't have prints or calls to dataframes to show the data in the console.&lt;/P&gt;&lt;P&gt;pandas is already imported by SAP&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 11:13:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14116663#M4915681</guid>
      <dc:creator>XaviPolo</dc:creator>
      <dc:date>2025-06-02T11:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python code error in dataflow</title>
      <link>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14118262#M4915883</link>
      <description>&lt;P&gt;Hi, Below code worked for me&lt;/P&gt;&lt;P&gt;def transform(data):&lt;/P&gt;&lt;P&gt;specific_name = ['Male']&lt;/P&gt;&lt;P&gt;nv = data['gender'].isin(specific_name)&lt;/P&gt;&lt;P&gt;df= data[nv]&lt;/P&gt;&lt;P&gt;return df&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jun 2025 19:25:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/python-code-error-in-dataflow/qaa-p/14118262#M4915883</guid>
      <dc:creator>Edula</dc:creator>
      <dc:date>2025-06-03T19:25:49Z</dc:date>
    </item>
  </channel>
</rss>

