isdsucph / isds2021

Introduction to Social Data Science 2021 - a summer school course https://isdsucph.github.io/isds2021/
MIT License
22 stars 37 forks source link

Ex 4.4 #24

Open MattiasNilsson95 opened 3 years ago

MattiasNilsson95 commented 3 years ago

Hi there!

This comes a little bit late, but I am having an issue with exercise 4.4 which possibly stems from a mistake in 4.3, and I would appreciate some help even if it comes after the assignment deadline.

When I try adding a column to the subset from 4.3 I recieve the following error:

image

I.e. I don't seem to be able to add a column, using the method specified erlier in the document, to the df_select as it is a copy of another dataframe. Is supposed to be the case or have I done something wrong?

This is what I did for exercise 4.3:

image

Note: For the moment I have worked around the issue simply by adding the column straight to df_weather.

Best, Mattias

joachimkrasmussen commented 3 years ago

Hi Mattias,

I hope you can live with a brief answer here, but instead of creating df_copy, do the line of operations directly on df_weather, instead. Then finish off with .copy() after the end bracket. Does this work?

Best, Joachim

MattiasNilsson95 commented 3 years ago

Hi Joachim,

Many thanks for your email and rapid help! This sounds promising, I will attempt it after work. Unfortunately it will be after the deadline, but it will be equally useful for my self development! In the meanwhile I sent in the assignment zero with what I was able to do, hope that is alright.

Best, Mattias

On Wed, 28 Jul 2021 at 09:35, joachimkrasmussen @.***> wrote:

Hi Mattias,

I hope you can live with a brief answer here, but instead of creating df_copy, do the line of operations directly on df_weather, instead. Then finish off with .copy() after the end bracket. Does this work?

Best, Joachim

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isdsucph/isds2021/issues/24#issuecomment-888085438, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWT5L6IT5MUQ3KL7RIHWRLTZ6XMXANCNFSM5BC5IYMA .

joachimkrasmussen commented 3 years ago

Great. It should not be a problem that you have not included this in your answer - learning is priority with this assignment!

Best, Joachim