Thank you for this tutorial. I am trying to make directories from a column of #s, but get this error - "TypeError: join() argument must be str or bytes, not 'int'" I did a test with string values that were not integers, and it worked... So is there any way around that rule about not using 'int' in the join() argument?? Thanks!!
@giovannicode9393
Жыл бұрын
Hi! Thanks. I will try to look at how to solve this problem.
@giovannicode9393
Жыл бұрын
Hi, I couldn't recreate your problem (can you be more specific what do you mean by saying "a column of #s". Maybe you solved it yourself?
@naturephan
Жыл бұрын
@@giovannicode9393 Hey. No worries! I got a bit sidetracked and haven't attempted to solve this... but essentially my column in the csv file is just a column of numbers. 123456 / 123457 / 123458 / 123459 / etc etc.... And it appeared the "join()" error I was getting was related to those values being integers (int) not a string of text...
@giovannicode9393
Жыл бұрын
Strange. I tried integers as input and it worked fine without any errors. I will try it again to be sure. Maybe there is a problem with data type in excel column. If you can please send me an excel file you are working with to my email.
@PetrilloProduction
2 жыл бұрын
if in my excel file (made from third part) there are some rows that are the same, how can avoid a file already exist error? Thanks
@giovannicode9393
2 жыл бұрын
Hi! I updated the code with code lines 14 and 39. These lines will remove the duplicate rows. Please check if it solves your problem.
@PetrilloProduction
2 жыл бұрын
@@giovannicode9393 Hello! yes, i found yesterday night my self a solution simply implementing "..,exist_ok=True)" but also your solution works! thanks! By the way now i have a last trouble. In my excel lists (given as i said you from third part) there are these duplicate rows that i don't really want to transform in folders. (little example: i have 10 rows of riders that i want make folders, 1 row of "break time" than other 7 riders for example and than 1 row of "break time" and go on...that's why of the duplicate folders)..so there is a way to say "hey python, i don't want to make folders if there is written "break time" , or maybe a last line that delete those folders so that i have a clean output :)
@giovannicode9393
2 жыл бұрын
That was tricky, but i think i found out how to do it. After line "result = list(dict.fromkeys(result)) " add "result = [x for x in result if not "brake time" in x]". For my test it worked.
@PetrilloProduction
2 жыл бұрын
@@giovannicode9393 it works really well, thanks man!
Пікірлер: 11