I have a data frame containing user behaviour on a website whereby every row is a single action performed by this concrete user (scroll, click, pageview). It means that for one unique user I have a different amount of rows where data such as e.g. city or device is always the same, but the URLs visited are different. But for some reason even though the data was collected within one session (= within a couple of minutes from one user's device) some of the rows have missing values (nans).
My goal is to create user profiles from that, but I don't know how to tell python to look through the language column for example and even if at least one value is not nan, then it should write this value as this user's language.
I know it's nothing complicated but I can't figure it out and would be very thankful for your help.
UPD: the whole data frame has about 7. Mio rows containing actions from about 400 Tsd. users so considering memory usage would be great too