Python Forum
ANOVA: DataFrame ha no Attribute alpha
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ANOVA: DataFrame ha no Attribute alpha
#2
You definitely need to clean up your data and restructure.

  1. remove semicolons and quotes from df; (you can use .apply method to do that)
  2. Do something like this before you start any analysis: df = pd.concat([df, df['Detergent_Brands'].str.get_dummies()], axis=1).drop(['Detergent_Brands'], axis=1).

Instead of accessing to data-frame columns as attributes (e.g. df.top etc), consider using df['top'], df['alpha']. This is approach is more robust, especially in cases when column names collide with data-frame internal methods.

You've got the error because your df hasn't a column named alpha (it hasn't a column named top too). .get_dummies should create these columns (but you need to clean up your data first).

I think, your data have not been properly parsed (loaded). Consider passing a separator, e.g. sep=';' to the read_csv function.
Reply


Messages In This Thread
ANOVA: DataFrame ha no Attribute alpha - by Tese - Jul-13-2019, 09:01 PM
RE: ANOVA: DataFrame ha no Attribute alpha - by scidam - Jul-14-2019, 01:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python for Analysis of variance / Anova xxxlabradorxxx 1 822 Sep-25-2023, 07:11 PM
Last Post: jefsummers
  Why is my gradient descent algorithm requiring such a small alpha? JoeB 1 2,424 Dec-08-2017, 05:15 PM
Last Post: JoeB

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020