<?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: AttributeError: 'DataFrame' object has no attribute 'rename' in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/attributeerror-dataframe-object-has-no-attribute-rename/m-p/28110#M19943</link>
    <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi @PHorniak&lt;/P&gt;
&lt;P&gt;You can use &lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;df_bostonLegible = df_boston.withColumnRenamed("zn", "Zoning")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;please accept the answer if it works or revert back with questions&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2019 10:05:45 GMT</pubDate>
    <dc:creator>mathan_pillai</dc:creator>
    <dc:date>2019-05-01T10:05:45Z</dc:date>
    <item>
      <title>AttributeError: 'DataFrame' object has no attribute 'rename'</title>
      <link>https://community.databricks.com/t5/data-engineering/attributeerror-dataframe-object-has-no-attribute-rename/m-p/28109#M19942</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hello, I am doing the Data Science and Machine Learning course.&lt;/P&gt;
&lt;P&gt;The Boston housing has unintuitive column names. I want to rename them, e.g. so 'zn' becomes 'Zoning'.&lt;/P&gt;
&lt;P&gt;When I run this command: &lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;df_bostonLegible = df_boston.rename({'zn':'Zoning'}, axis='columns')&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then I get the error "AttributeError: 'DataFrame' object has no attribute 'rename'".&lt;/P&gt;
&lt;P&gt;I did a websearch and found a few guides that were inapplicable:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/28163439/attributeerror-dataframe-object-has-no-attribute-height/28163504" target="test_blank"&gt;https://stackoverflow.com/questions/28163439/attributeerror-dataframe-object-has-no-attribute-height/28163504&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/38134643/data-frame-object-has-no-attribute" target="test_blank"&gt;https://stackoverflow.com/questions/38134643/data-frame-object-has-no-attribute&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 23:20:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/attributeerror-dataframe-object-has-no-attribute-rename/m-p/28109#M19942</guid>
      <dc:creator>PHorniak</dc:creator>
      <dc:date>2019-04-30T23:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'DataFrame' object has no attribute 'rename'</title>
      <link>https://community.databricks.com/t5/data-engineering/attributeerror-dataframe-object-has-no-attribute-rename/m-p/28110#M19943</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi @PHorniak&lt;/P&gt;
&lt;P&gt;You can use &lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;df_bostonLegible = df_boston.withColumnRenamed("zn", "Zoning")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;please accept the answer if it works or revert back with questions&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 10:05:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/attributeerror-dataframe-object-has-no-attribute-rename/m-p/28110#M19943</guid>
      <dc:creator>mathan_pillai</dc:creator>
      <dc:date>2019-05-01T10:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'DataFrame' object has no attribute 'rename'</title>
      <link>https://community.databricks.com/t5/data-engineering/attributeerror-dataframe-object-has-no-attribute-rename/m-p/28111#M19944</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;wow great information totally love it buddy.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 12:35:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/attributeerror-dataframe-object-has-no-attribute-rename/m-p/28111#M19944</guid>
      <dc:creator>iosman</dc:creator>
      <dc:date>2019-05-01T12:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'DataFrame' object has no attribute 'rename'</title>
      <link>https://community.databricks.com/t5/data-engineering/attributeerror-dataframe-object-has-no-attribute-rename/m-p/56076#M30502</link>
      <description>&lt;P&gt;&lt;SPAN&gt;If df_boston is a DataFrame, but you still face issues, try an alternative syntax: df_boston = df_boston.rename(columns={'zn': 'Zoning'}).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure df_boston is a proper DataFrame and you're using a recent version of Pandas.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 10:50:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/attributeerror-dataframe-object-has-no-attribute-rename/m-p/56076#M30502</guid>
      <dc:creator>KrunalLathiya</dc:creator>
      <dc:date>2024-01-02T10:50:36Z</dc:date>
    </item>
  </channel>
</rss>

