Skip to content

Tag: python

Modify output of pandas day_name() function

I have a data frame with df name : InvoiceNumber ProductCode InvoiceDate UnitPrice CustomerId Country 0 489434 85048 2009-12-01 07:45:00 6.95 13085 United Kingdom 1 489434 79323P 2009-12-01 07:45:00 6.75 13085 United Kingdom 2 489434 79323W 2009-12-01 07:45:00 6.75 13085 United Kingdom 3 489434 22041 2009-12-…

how to make a guess number game?

im trying to make a guessing game, user can input the level she wants, if 1 just numbers between 1,9 and if 2 between 10,99 otherwise between 100,99… here is my code: problem is when i input 1 or 2 or 3 it always returns a 3digit question like 395 + 341 — anyway the other problem is i want

Python infinite loop I tried with while but no luck

hi guys im new at coding im trying to create an infinite loop in the follow code I tried with while but no luck, can someone help me please? Thanks for the attention and have a nice day(= Answer To make infinite loop just use

How to loop through a folder in Python

I am a new python user and I am trying to loop through all the items in a set file. Here is my code this far – When I load the for loop without the pd.read_excel it prints the names of each of the sheets in the console yet when I add in the read_excel portion I receive an error

Room Exploration; Issues with collecting items from a dictionary

I’m creating a room exploration game with Python but am having issues with item collection and the win condition being met (collecting all items to ‘win’ and losing if not all items are collected). Room movement, help and quitting function but I’m confused where to begin with items. I …