Trending questions in Python

0 votes
0 answers

How do I access environment variables in Python?

May 26, 2022 in Python by Kichu
• 19,040 points
856 views
0 votes
0 answers

TypeError: 'NoneType' object is not iterable in Python

What does this error mean?  I get this ...READ MORE

May 5, 2022 in Python by Kichu
• 19,040 points
1,698 views
0 votes
0 answers

'str' object has no attribute 'decode'. Python 3 error?

Code: import imaplib from email.parser import HeaderParser conn = imaplib.IMAP4_SSL('imap.gmail.com') conn.login('example@gmail.com', ...READ MORE

May 13, 2022 in Python by Kichu
• 19,040 points
1,232 views
0 votes
0 answers

memory error in python

I am working on a  program that ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
676 views
0 votes
0 answers

Python 3 ImportError: No module named 'ConfigParser'

I want to pip - install the ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,040 points
1,936 views
0 votes
0 answers

How to prettyprint a JSON file?

May 27, 2022 in Python by Kichu
• 19,040 points
537 views
+1 vote
3 answers

ModuleNotFoundError: No module named 'speech_recognition' Not able to install speech_recognition in python:

Hey. You have to use SpeechRecognition as module ...READ MORE

Nov 28, 2018 in Python by Omkar
• 69,220 points
41,956 views
0 votes
0 answers

ModuleNotFoundError: No module named 'sklearn'

I am using Anaconda and Python 3.6.1 ...READ MORE

May 20, 2022 in Python by Kichu
• 19,040 points
780 views
0 votes
0 answers

how to merge two data frames based on particular column in pandas python?

I want to  merge two data frames: df1 company,standard tata,A1 cts,A2 dell,A3 df2 company,return tata,71 dell,78 cts,27 hcl,23 I ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
531 views
0 votes
1 answer

Error: 'int' object is not subscriptable - Python

The issue is in the line: int([x[age1]]) The solution ...READ MORE

Apr 30, 2022 in Python by narikkadan
• 63,600 points
1,632 views
0 votes
0 answers

How can I install XGBoost package in python on Windows

I am using windows 64bit os and ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
523 views
0 votes
0 answers

Extract a page from a pdf as a jpeg

How can I  save a certain page ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
473 views
0 votes
0 answers

Double the value of array on a match - Python

I want to iterate through the elements ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,040 points
1,855 views
0 votes
0 answers

How do I do a case-insensitive string comparison?

How can I do case-insensitive string comparison ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
492 views
0 votes
0 answers

"getaddrinfo failed", what does that mean?

I am getting this error when launching ...READ MORE

May 13, 2022 in Python by Kichu
• 19,040 points
1,005 views
0 votes
0 answers

How do I convert a datetime to date?

How do I convert a datetime.datetime object ...READ MORE

May 24, 2022 in Python by Kichu
• 19,040 points
554 views
0 votes
0 answers

Why am I getting a FileNotFoundError?

I am working on a program that ...READ MORE

May 24, 2022 in Python by Kichu
• 19,040 points
476 views
0 votes
0 answers

Writing a pandas DataFrame to CSV file

I want to write a pandas data ...READ MORE

May 21, 2022 in Python by Kichu
• 19,040 points
578 views
0 votes
0 answers

How to install pywhatkit in python?

if I am going to install pywhatkit ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
1,736 views
+2 votes
2 answers

ModuleNotFoundError: No module named 'pyttsx3

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

Apr 24, 2020 in Python by MD
• 95,460 points
29,312 views
0 votes
1 answer

How to parse `request.body` from POST in Django?

Hello @kartik, In Python 3.0 to Python 3.5.x, json.loads() will ...READ MORE

Aug 5, 2020 in Python by Niroj
• 82,840 points
28,640 views
0 votes
0 answers

How do I use matplotlib autopct?

I want to create a matplotlib pie ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,040 points
1,582 views
0 votes
0 answers

Python's equivalent of && (logical-and) in an if-statement

This is not  working : if cond1 && cond2: Can ...READ MORE

May 20, 2022 in Python by Kichu
• 19,040 points
334 views
0 votes
1 answer

Simple prime number generator in Python

There are some problems with your code. You ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,600 points
1,373 views
0 votes
0 answers

Python Requests get returns response code 401 for nse india website

I use this program to get the ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
1,498 views
0 votes
0 answers

Automate logging in to MS form using Python

I have to login into the same ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
1,495 views
0 votes
0 answers

How can I prevent the TypeError: list indices must be integers, not tuple when copying a python list to a numpy array?

I want to create 3 numpy arrays/lists ...READ MORE

May 7, 2022 in Python by narikkadan
• 63,600 points
854 views
0 votes
0 answers

Conda: Creating a virtual environment

I am trying to create a virtual ...READ MORE

May 9, 2022 in Python by Kichu
• 19,040 points
663 views
0 votes
0 answers

TypeError: 'int' object is not callable

This is the code : from __future__ import ...READ MORE

May 8, 2022 in Python by Kichu
• 19,040 points
680 views
0 votes
1 answer

Is Python strongly typed?

Python is both strongly and dynamically typed. Strongly ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,600 points
1,074 views
0 votes
1 answer

ln (Natural Log) in Python

Use math.log it is a natural logarithm. For ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,600 points
1,095 views
0 votes
1 answer

Programmatically generate video or animated GIF in Python?

You can use  ImageMagick. Save your frames ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,600 points
1,009 views
0 votes
1 answer

Spell Checker for Python

This function, in particular, has the ideas ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,600 points
945 views
0 votes
0 answers

Why does "pip install" inside Python raise a SyntaxError?

I wanted to use pip to install ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,040 points
1,048 views
0 votes
0 answers

IndentationError: unindent does not match any outer indentation level

When I compile  my python code I ...READ MORE

May 2, 2022 in Python by Kichu
• 19,040 points
664 views
0 votes
0 answers

How to generate all permutations of a list?

How do you generate all the permutations ...READ MORE

Apr 26, 2022 in Python by Edureka
• 13,620 points
860 views
0 votes
1 answer

Unsupported operand type(s) for +: 'int' and 'str'

You seem to be trying to train ...READ MORE

Feb 23, 2022 in Python by Aditya
• 7,680 points
3,478 views
0 votes
1 answer

What does "SyntaxError: Missing parentheses in call to 'print'" mean in Python?

This error is generated when one is ...READ MORE

Feb 14, 2022 in Python by Nandini
• 5,480 points
3,802 views
0 votes
0 answers

Renaming column names in Pandas

How can  I change the column labels of ...READ MORE

May 5, 2022 in Python by Kichu
• 19,040 points
378 views
0 votes
1 answer

How to urlencode a querystring in Python?

Just pass your parameters into urlencode() like: >>> import urllib >>> ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,600 points
658 views
0 votes
1 answer

Django object is not JSON serializable

Hello @kartik, simplejson and json don't work with django objects well. Django's ...READ MORE

Aug 7, 2020 in Python by Niroj
• 82,840 points
27,755 views
0 votes
0 answers

Print multiple arguments in Python

This is my code: print("Total score for %s ...READ MORE

Apr 25, 2022 in Python by Kichu
• 19,040 points
753 views
0 votes
1 answer

Parse date string and change format

Use datetime module. it can help you change the ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,600 points
614 views
0 votes
0 answers

Open Whatsapp Windows app directly from python program using url

According to this FAQ page of Whatsapp on How to ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,620 points
951 views
+1 vote
1 answer

Unzipping files in Python

Use this code: import zipfile with zipfile.ZipFile(path_to_zip_file, 'r') as ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,600 points
559 views
0 votes
0 answers

Switching between Python 3.7 and 3.8 under Anaconda

What is the rationale for having two ...READ MORE

Apr 26, 2022 in Python by Edureka
• 13,620 points
574 views
0 votes
1 answer

How do I upgrade the Python installation in Windows 10?

If you have 2.x or 3.x version ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,600 points
499 views
0 votes
0 answers

How to know which Python is running in Jupyter notebook?

I am using jupyter notebook and I ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,040 points
625 views
0 votes
0 answers

How do I use method overloading in Python?

I am trying to implement method overloading ...READ MORE

Apr 26, 2022 in Python by Edureka
• 13,620 points
549 views
0 votes
0 answers

Why do I get "List index out of range" when trying to add consecutive numbers in a list using "for i in list"?

Given the following list a = [0, 1, ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,040 points
601 views