The c in causal stands for Cory@coryfromphilly·Aug 29, 2022Replying to @Aella_Girlfiltered_df[(flitered_df['poland'] == 1) | (filtered_df['france'] == 1)] The | is an or operator (and the & is an and operator)25
Aella@Aella_GirlReplying to @coryfromphillyshouldn't there be a 'loc' in there somewhere2:44 AM · Aug 29, 20223 Likes
on!o@monodevice·Aug 29, 2022Replying to @Aella_Girlgood question. here’s a solid Stack answer and loc is more robust generally but both workstackoverflow.comPython: Pandas Series - Why use loc?Why do we use 'loc' for pandas dataframes? it seems the following code with or without using loc both compile anr run at a simulular speed %timeit df_user1 = df.loc[df.user_id=='5561'] 100 loops,...13
ian@ian_cogneato·Aug 29, 2022Replying to @Aella_Girlyeah .loc is best practice for reasons that don't bear getting into, but this is still the right answer