Trending questions in Python

0 votes
1 answer

How do you convert two lists into a dictionary?

There are three different ways of converting ...READ MORE

May 27, 2019 in Python by Taj
• 1,080 points
18,425 views
+1 vote
1 answer

How do I create a slug in Django?

Hello @kartik, You will need to use the ...READ MORE

Jun 26, 2020 in Python by Niroj
• 82,840 points
1,266 views
0 votes
1 answer

Error:PermissionError with pip3

Hello @kartik, Just install them using --user option ...READ MORE

Jul 2, 2020 in Python by Niroj
• 82,840 points
1,018 views
0 votes
1 answer

How to set dataframe based on Index Name & Column name ?

Hi@Gaurav, You can use set_index function in pandas. It allows ...READ MORE

Jun 29, 2020 in Python by MD
• 95,460 points
1,092 views
0 votes
1 answer

Create a SQL table from a Pandas DataFrame.

Hi@akhtar, You can use the Sqlalchemy module to ...READ MORE

Jun 26, 2020 in Python by MD
• 95,460 points
1,212 views
0 votes
1 answer

How can I enable project_id parameter of DJango to be optional?

Hello @kartik, There are several approaches. One is to ...READ MORE

Jul 3, 2020 in Python by Niroj
• 82,840 points
916 views
+1 vote
0 answers

TypeError: unsupported operand type(s) for /: 'list' and 'list'

This is my part of code, why ...READ MORE

May 17, 2020 in Python by anonymous
• 220 points

edited May 18, 2020 by Gitika 2,899 views
0 votes
1 answer

How to insert an object at a given index in Python?

Hi, @Roshni, I will explain to you with ...READ MORE

Jun 24, 2020 in Python by Gitika
• 65,770 points
1,296 views
0 votes
1 answer

Error:Matplotlib tight_layout() doesn't take into account figure suptitle

Hello, You can simply adjust the coordinates of the ...READ MORE

May 7, 2020 in Python by Niroj
• 82,840 points
3,269 views
0 votes
1 answer

I want to install checker package using pip for my code because it shows no reference in my webapp code.

Hi@Rahul, You are trying to use configparser module. ...READ MORE

Jul 7, 2020 in Python by MD
• 95,460 points
614 views
0 votes
1 answer

How do I clone a Django model instance object and save it to the database?

Hello @kartik, Just change the primary key of ...READ MORE

Jun 26, 2020 in Python by Niroj
• 82,840 points
1,096 views
0 votes
1 answer

ImportError: Environment variable DJANGO_SETTINGS_MODULE is undefined

Hello @kartik, You just need to be able to ...READ MORE

Jun 12, 2020 in Python by Niroj
• 82,840 points
1,691 views
0 votes
1 answer

Error while installing Django with Anaconda.

This error is probably because you don't ...READ MORE

Jun 24, 2020 in Python by Sirajul
• 59,230 points
1,162 views
0 votes
0 answers

Module not callable in python in the following code?

mport pandas as pd import xlsxwriter as xw input_string ...READ MORE

May 23, 2020 in Python by Ratan
• 120 points
2,607 views
0 votes
1 answer

How to set up a PostgreSQL database in Django?

Hello @kartik, Steps that I use: - sudo apt-get ...READ MORE

Jun 30, 2020 in Python by Niroj
• 82,840 points
879 views
+1 vote
1 answer

Python error "pygame.error: Couldn't open pygame.png"

icon = pygame.image.load('spaceship.png') pygame.error: Couldn't open spaceship.png I am ...READ MORE

Apr 9, 2020 in Python by Ali
10,751 views
0 votes
1 answer

How to delete column from pandas DataFrame?

Hi@akhtar, You can use the del command in ...READ MORE

Jun 24, 2020 in Python by MD
• 95,460 points
1,149 views
0 votes
1 answer

failed: unable to get local issuer certif icate (_ssl.c:1056)'))'

Hi@akhtar, To avoid this error, you need to ...READ MORE

Apr 22, 2020 in Python by MD
• 95,460 points
3,833 views
0 votes
1 answer

How to change data types in Pandas DataFrame?

Hi@akhtar, You can use astype function to change ...READ MORE

Jun 23, 2020 in Python by MD
• 95,460 points
1,166 views
0 votes
1 answer

How to fetch HTML code using urllib module in Python?

Hi@akhtar, You can use urllib module to fetch ...READ MORE

Jun 26, 2020 in Python by MD
• 95,460 points
991 views
+1 vote
1 answer

Error: current transaction is aborted, commands ignored until end of transaction block?

Hello @kartik, To get rid of the error, roll ...READ MORE

Jun 22, 2020 in Python by Niroj
• 82,840 points
1,125 views
0 votes
1 answer

How to draw BoxPlot in Python?

Hi Guys, You can use the plot function ...READ MORE

Jun 26, 2020 in Python by MD
• 95,460 points
968 views
0 votes
1 answer

How can I disable the Django Celery admin modules?

Hello @kartik, To be more specific, in admin.py of any ...READ MORE

Jun 12, 2020 in Python by Niroj
• 82,840 points
1,543 views
0 votes
1 answer

How do you get a list of all the keys in a dictionary?

Hey, @Roshin, I would like to give you ...READ MORE

Jun 23, 2020 in Python by Gitika
• 65,770 points
1,061 views
0 votes
1 answer

How to a write reg expression that confirms an email id using the python reg expression module “re”?

Hey, @Roshni, Python has a regular expression module ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,770 points
932 views
0 votes
2 answers

Which IDE should I use for python?

Pycharm or Spyder. You can even use visual ...READ MORE

Jun 23, 2020 in Python by Anjali
1,018 views
+1 vote
1 answer

How to get the home directory using ‘~’ in Python?

Hello, @Roshni, You need to import the os module, ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,770 points
870 views
0 votes
1 answer

How to test python code using Pytest?

Hi@akhtar, You can use the Pytest module to ...READ MORE

Jun 24, 2020 in Python by MD
• 95,460 points
1,020 views
0 votes
3 answers

'python' is not recognized as an internal or external command

Try "py" instead of "python" from command line: C:\Users\Cpsa>py Python 3.4.1 (v3.4.1:c0e311e010fc, May ...READ MORE

Feb 8, 2022 in Python by Rahul
• 9,680 points
2,533 views
0 votes
1 answer

the syntax getting error solve it please

Hi@shahzad, Your dataset contains a string value. You ...READ MORE

Jun 18, 2020 in Python by MD
• 95,460 points
1,240 views
0 votes
0 answers

Python | Combine two bots into one

Hi everyone, Basically i made a bot in ...READ MORE

Jun 30, 2020 in Python by PrKit
• 120 points
738 views
0 votes
1 answer

How to merge two DataFrame in Pandas?

Hi@akhtar, You can use Pandas.merge() function to merge ...READ MORE

Jun 23, 2020 in Python by MD
• 95,460 points
1,032 views
0 votes
1 answer

How to convert string to date in python with different algorithms ?

Hello @ pagarsach, You can convert a string to ...READ MORE

Jun 30, 2020 in Python by Niroj
• 82,840 points
896 views
0 votes
1 answer

Error:Warning:config file server.conf not found

Hello @kartik, By default, informational and debugging messages ...READ MORE

Jun 22, 2020 in Python by Niroj
• 82,840 points
1,002 views
+1 vote
2 answers

Python convert XLS and XLSX file to csv

XLSX tables are usually created in MS ...READ MORE

Aug 30, 2019 in Python by Mian Tanzeel
18,147 views
0 votes
1 answer

How to call an external command from Python?

Hi@akhtar, You can use the os module in ...READ MORE

Jun 25, 2020 in Python by MD
• 95,460 points
884 views
0 votes
1 answer

How to remove the last object from a list?

Hi, @Roshni, Try running the following piece of ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,770 points
801 views
0 votes
1 answer

Error:pip install mysql-python fails with EnvironmentError: mysql_config not found

Hello @kartik, It seems mysql_config is missing on ...READ MORE

May 5, 2020 in Python by Niroj
• 82,840 points
2,986 views
0 votes
1 answer

How to create a virtual environment to run a particular version of python?

Hi@akhtar To create a virtual environment, decide upon ...READ MORE

Jun 25, 2020 in Python by MD
• 95,460 points
774 views
0 votes
1 answer

NameError on coding

well i think the sapi5 is not ...READ MORE

Jun 28, 2020 in Python by Shaurya Thapliyal
• 340 points
790 views
0 votes
1 answer

How to use MySQLdb with Python and Django?

Hello @kartik, I had the same error and pip ...READ MORE

Jun 24, 2020 in Python by Niroj
• 82,840 points
808 views
0 votes
1 answer

Error in the Javis Project

what you can do is download the ...READ MORE

Jun 28, 2020 in Python by Shaurya Thapliyal
• 340 points
1,067 views
0 votes
0 answers

how to install kivy module in spyder?

Apr 20, 2020 in Python by amey
• 120 points
3,628 views
0 votes
1 answer

How to transform a Python string into a list?

Hi, @Roshni, You can use Python <split()> function ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,770 points
675 views
0 votes
1 answer

How to create a unicode string in python with the string eg: This is a string?

Hey, @Roshni, It is very simple to execute, ...READ MORE

Jun 23, 2020 in Python by Gitika
• 65,770 points
806 views
0 votes
1 answer

Python: Copy names from txt file to csv format

Hi@ANAND, It depends on your use case. In ...READ MORE

Jun 10, 2020 in Python by MD
• 95,460 points
1,461 views
0 votes
1 answer

Importing Image

Hi@Amine, The error is because there is some ...READ MORE

Jun 25, 2020 in Python by MD
• 95,460 points
723 views
0 votes
1 answer

Error:django-debug-toolbar breaking on admin while getting sql stats

Hello @kartik, You just need to be able ...READ MORE

Jun 12, 2020 in Python by Niroj
• 82,840 points
1,273 views
0 votes
1 answer

How to create the following pattern using Python?

Hi, @Roshni, You can use two for-loops for ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,770 points
689 views