Posts by Rodrigo O'neal • 81 points
6 posts
-
2
votes1
answer28
viewsA: imports csv files automatically
You can use the listdir function of the import the files = os.listdir('Folder path') this function will return a list containing all the files within that folder. You can create a function to take…
-
1
votes2
answers101
viewsA: Doubt print game list of old Python
Your mistake is here if linha and coluna in positions: Python will not scan the 2x positions column because it used the operator and I know that in the head it makes more sense to think like an "E".…
-
0
votes1
answer157
viewsA: How to add values in excel in python
You need to set the way as append(mode='a') writer = pd.ExcelWriter('Responsável Técnico.xlsx', mode='a') df.to_excel(writer, 'Planilha', index=False) writer.save()…
pythonanswered Rodrigo O'neal 81 -
0
votes1
answer168
viewsA: How to compare two lists of names in python?
lista_a = ['ana', 'Bob', 'Mario'] lista_b = ['ana', 'Carlos', 'Pedro'] for nome in lista_a: if nome in lista_b: print(i) In python when you put the in it checks if it is inside something. In this…
-
2
votes2
answers2194
viewsA: How do I execute a command once every hour in python?
I recommend you take a look at the library Schedule import schedule import time def f(): print("Hello World") schedule.every().hour.do(f) while True: schedule.run_pending() time.sleep(1)…
-
-1
votes1
answer112
viewsQ: A program that every time it is called updates the time and return
Good night I’m trying to make a program that tests if the internet is working and if not returns the time that will be stored in a file so I can complain to the internet operator. Since whenever I…