Skip to content
Advertisement

Tag: rows

Multiply rows in pandas DataFrame depending on values from c

I would like to get from this: nname eemail email2 email3 email4 Stan stan@example.com NO stan1@example.com NO Danny danny@example.com danny1@example.com danny2@example.com danny3@example.com Elle elle@example.com NO NO NO To this: nname eemail Stan stan@example.com Stan stan1@example.com Danny danny@example.com Danny danny1@example.com Danny danny2@example.com Danny danny3@example.com Elle elle@example.com I know I can create 4 separate DFs with name and email column, then merge

Finding the number of rows for all files within a folder

Hello I am trying to find the number of rows for all files within a folder. I am trying to do this for a folder that contains only “.txt” files and for a folder that contains .”csv” files. I know that the way to get the number of rows for a SINGLE “.txt” file is something like this: Whereas for

Advertisement