Trending questions in Python

0 votes
1 answer

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

Hello @kartik, For centos users: yum install -y mysql-devel python-devel python-setuptools then pip ...READ MORE

May 27, 2020 in Python by Niroj
• 82,880 points
2,962 views
0 votes
1 answer

Error:after upgrading pip: cannot import name 'main'

Hello @kartik, You must have inadvertently upgraded your ...READ MORE

Jun 5, 2020 in Python by Niroj
• 82,880 points
2,542 views
0 votes
1 answer

How to override the django admin translation?

Hello @kartik, Just as you can override a ...READ MORE

Jun 12, 2020 in Python by Niroj
• 82,880 points
2,231 views
0 votes
1 answer

How to convert .ipynb files into .py?

You can use this command to convert ...READ MORE

Aug 8, 2019 in Python by hansika
15,609 views
0 votes
1 answer

Python: Splitting numPY 2 D Array

For splitting the 2d array,you can use ...READ MORE

Jul 15, 2019 in Python by Siri

edited Oct 7, 2021 by Sarfaraz 16,603 views
0 votes
1 answer

How to dynamically load a module in Python?

Hi, Dynamic loading is where we do not ...READ MORE

Jun 26, 2020 in Python by Roshni
• 10,520 points
1,624 views
0 votes
1 answer

Python error saying "AttributeError: can't set attribute"

change your code to the following: @x.setter def x(self, ...READ MORE

May 30, 2019 in Python by Imran
18,567 views
0 votes
1 answer

Integrating Python code in .NET / Java

Hi,@Rajeshmthakkar, Jython is a Python interpreter implemented in ...READ MORE

Jul 27, 2020 in Python by Gitika
• 65,910 points
460 views
0 votes
1 answer

How to save an image locally using Python in which we already know the URL address?

Hi, @Roshni, The following code is used to ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,910 points
1,580 views
+1 vote
1 answer

Pressing "ENTER" in Instagram search box Python Selenium

driver.get("https://www.instagram.com/explore/tags/" + hashtag + "/") You will not ...READ MORE

Nov 5, 2020 in Python by vinnie Irvine

reshown Nov 5, 2020 by Sirajul 1,627 views
0 votes
1 answer

AttributeError: type object 'DataFrame' has no attribute 'from_items'

Hi, @Bronson, You can go through this, I ...READ MORE

Apr 6, 2020 in Python by Gitika
• 65,910 points
5,015 views
0 votes
1 answer

How to create MySql database using Python?

Hi@akhtar, You need to use MySQL connector in ...READ MORE

Jul 15, 2020 in Python by MD
• 95,440 points
679 views
0 votes
1 answer

ImportError: cannot import name 'main' in pip

Hi@akhtar, To avoid this error, you should upgrade ...READ MORE

Apr 15, 2020 in Python by MD
• 95,440 points
4,560 views
0 votes
1 answer

Python pandas: print all values greater than zero in the dataframe

You can use the following code: df[df > ...READ MORE

May 13, 2019 in Python by Esha
19,187 views
0 votes
1 answer

Django Server Error: port is already in use

Hello @kartik, Just type: sudo fuser -k 8000/tcp. This ...READ MORE

Jun 26, 2020 in Python by Niroj
• 82,880 points
1,419 views
0 votes
2 answers

How to split excel field data which contains the multiple delimiter values?

Try the following: new = data["Filed_data"].str.split(";", n = ...READ MORE

Jun 25, 2020 in Python by Shivam Dutt Sharma
1,411 views
0 votes
1 answer

How to convert a dictionary into a list in python?

Hi@akhtar You can convert a dictionary dataset into ...READ MORE

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

How to save numpy array?

Hi@akhtar, You can use numpy.save() function to save ...READ MORE

Jun 22, 2020 in Python by MD
• 95,440 points
1,569 views
0 votes
1 answer

How to write a Python code to sort a numerical dataset?

Hi, @Roshni,  The code to sort a numerical ...READ MORE

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

How Can I delete a record in Django models?

Hello @kartik, If you want to delete one ...READ MORE

Jun 23, 2020 in Python by Niroj
• 82,880 points
1,512 views
0 votes
1 answer

How to create a database engine using Sqlalchemy in Python?

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

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

Unable to create EC2 instance using boto3

Hi@Pradeep, I have tried the below code and ...READ MORE

Jul 13, 2020 in Python by MD
• 95,440 points
672 views
0 votes
1 answer

String is immutable data type. String.replace() So why there is command for string to replace the values....??

Hey, @Nelson, replace() actually returns a *copy* of ...READ MORE

Mar 30, 2020 in Python by Gitika
• 65,910 points
5,191 views
0 votes
1 answer

Can somebody explain the output of this code snippet?

By making a copy of a list ...READ MORE

Jun 23, 2020 in Python by Ya Sd
1,443 views
0 votes
1 answer

How to remove the white spaces from the string “aaa bbb ccc ddd eee”?

Hi, @Roshni, You can do it Using join, read ...READ MORE

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

Web scraping data from a Spotfire web report

Hi, @There, You can try this: It reads ...READ MORE

Jun 30, 2020 in Python by Gitika
• 65,910 points
1,241 views
0 votes
1 answer

Error:SSL backend error when using OpenSSL

Hii @kartik, After reading their INSTALLATION file, I ...READ MORE

May 20, 2020 in Python by Niroj
• 82,880 points
2,903 views
0 votes
0 answers

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Hi guys i have below code . ...READ MORE

Oct 30, 2019 in Python by sumanth
• 190 points
11,709 views
0 votes
1 answer
0 votes
1 answer

Python interpreter error: I have installed Python 3.8 but it shows version 3.7

Add python3.8 in the environment variables . ...READ MORE

Jun 23, 2020 in Python by Mr X
1,363 views
0 votes
1 answer

How to convert a DictProxy object into JSON serializable dict?

Hello, Rather than using a private DictProxy method like _getvalue(), I'd ...READ MORE

Apr 15, 2020 in Python by Niroj
• 82,880 points
4,325 views
0 votes
1 answer

How to find the value of a row in a csv file in python?

If you want to find the value ...READ MORE

May 20, 2019 in Python by Sanam
18,606 views
0 votes
1 answer

how to get the volume size in docker-py?

When you created one volume in docker ...READ MORE

Apr 8, 2020 in Python by MD
• 95,440 points
4,613 views
0 votes
1 answer

What is the function to randomize the items of a list in-place?

Hello @Roshni, Python has a built-in module called ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,910 points
1,204 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,880 points
883 views
0 votes
1 answer

How to Specify a mySQL ENUM in a Django model?

Hello @kartik, You can follow this snippet below: MAYBECHOICE ...READ MORE

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

How do I use Django templates without the rest of Django?

Hello @kartik, Let's say you have this important ...READ MORE

Jun 23, 2020 in Python by Niroj
• 82,880 points
1,259 views
0 votes
0 answers

utf-8' codec can't decode byte 0xa0 in position 10: invalid start byte

my code import wordcloud import numpy as np from matplotlib ...READ MORE

Mar 29, 2020 in Python by anonymous
• 120 points
5,013 views
+1 vote
1 answer

How to create a model dynamically just for testing in djanjo?

Hello @kartik, The basic idea is, make your tests an ...READ MORE

Jun 29, 2020 in Python by Niroj
• 82,880 points
945 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,880 points
1,075 views
0 votes
1 answer

How to install pycharm?

PyCharm is one of the most widely ...READ MORE

Jun 23, 2020 in Python by Sirajul
• 59,230 points
1,217 views
0 votes
1 answer

error: while concatenation in a dataframe using pandas!

Hi@akhtar, When we use Concat function we have ...READ MORE

May 5, 2020 in Python by MD
• 95,440 points
3,320 views
0 votes
1 answer

How to split a large sample of text into words in Python?

Hi@akhtar, You can use nltk module to split your text ...READ MORE

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

How to plot 3D charts in Python?

Hi@akhtar, Python is capable of creating 3d charts. ...READ MORE

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

Error: when install pylibmc using pip

Hello @kartik, It's in the libmemcached package. To ...READ MORE

May 20, 2020 in Python by Niroj
• 82,880 points
2,636 views
0 votes
1 answer

How to get two tags in findall using BeautifulSoup?

You can mention both the tags in ...READ MORE

Apr 2, 2019 in Python by Giri
20,492 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,880 points
716 views
+1 vote
1 answer

ImportError: cannot import name 'appdirs'

Hi@akhtar, I think you missed some module to ...READ MORE

May 5, 2020 in Python by MD
• 95,440 points
3,186 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,440 points
985 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,440 points
501 views