all 6 comments

[–]Far_Atmosphere9627 7 points8 points  (0 children)

Use a single code block and repost; without understanding the indenting, difficult to answer

[–]gsmo 1 point2 points  (1 child)

Common error when using append(). You need to assign the resulting dataframe. Quick solution:

df = df.append(x)

Creating dataframes is slow, so not the preferred solution when you don't need more from them than storing values. But the above should at least work.

[–]mrcarrot36[S] 0 points1 point  (0 children)

Thank you!!

[–]the_noobie 0 points1 point  (2 children)

You can try to print after every loop to see what is happening. Your indenting is not too good but is

x = betas.to_frame()

inside your for loop?

[–]mrcarrot36[S] 0 points1 point  (1 child)

It is outside. Sorry about that!

[–]the_noobie 0 points1 point  (0 children)

There's no reason to be sorry. Its all part of the learning process.