I’ve just installed Anaconda in my new laptop, and created an environment with geopandas installed in it. I’ve tried to upload the world map that comes with geopandas through the following code: But I obtain the following error message: Since this error has never appeared in my old laptop, I guess…
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 can we print a list of ASCII characters to the console, except forthose characters which have an escape sequence?
For any ascii characters ch, I would like to print ch unless repr(ch) begins with a back-slash character. I want to print a list of all of the “nice” ascii characters. Failed Attempt The console print-out is: I seem to have printed a lot of weird unicode characters, such as ç and õ Answer As sj951…
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
ImportError: No module named schedule
I have made a scheduled programme on the osx system and I am trying to run it in the background, I read a different question about it and it said that this should work in the terminal by using this command, I have also tried downloading the modules as a root, nothing changed: But the terminal returns 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 …
How to parameterize create table function for PostgreSQL in python
I need to dynamically create tables in python this statement works when the variable is statically identified but when I use a variable I get the following error When I change to using this code it will work Here is the error The only thing not in this is a method to manage connection parameters that is worki…
python manage.py collectstatic not working: TypeError: sequence item 0: expected str instance, NoneType found
I have been following this video on Youtube: https://www.youtube.com/watch?v=inQyZ7zFMHM1 My project so far is working fine with static files and all the files load and work properly. So, now I have to deploy the website on Heroku and for that, I uploaded the database on Amazon AWS using this video. After buc…