Most answered questions in Python

0 votes
1 answer

ERROR: Could not build wheels for line-profiler which use PEP 517 and cannot be installed directly.

Hi@akhtar, If you are trying to install with pip ...READ MORE

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

ModuleNotFoundError: No module named 'line_profiler'.

Hi@akhtar, You need to install the module in ...READ MORE

Nov 5, 2020 in Python by MD
• 95,440 points
1,903 views
+1 vote
1 answer

Can anyone help me with this error: TypeError: list indices must be integers or slices, not str

Hi, @Varshap  It’s a TypeError, which tells us ...READ MORE

Nov 5, 2020 in Python by anonymous
• 65,910 points
2,062 views
0 votes
1 answer

Could you please help to write a code for this program

Hello, @Hitesh, You can follow the below: print("List of ...READ MORE

Nov 4, 2020 in Python by Roshni
• 10,520 points
1,674 views
0 votes
1 answer

ImportError: No module named mpmath. But mpmath has been installed.

You should use conda to install Python ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
1,065 views
0 votes
1 answer

Is there any built in sorted data structure in python?

Yes. List is sortable. Dict is also ...READ MORE

Nov 4, 2020 in Python by Richa sharma
572 views
0 votes
1 answer

How to print only the line which starts with P?

Hi, you might have found another way ...READ MORE

Dec 2, 2020 in Python by Tyler
• 140 points
867 views
0 votes
1 answer

What is selenium in python?

It is known as Web automations, It is ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
388 views
0 votes
1 answer

How to convert doc file into pdf using python?

A simple example using com types, converting ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
1,709 views
0 votes
1 answer

How to make this add every number %a == 0 in the loop?

You can go through the given below ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
304 views
0 votes
1 answer

How to take user input python3?

Use a while True: loop, to take input forever, ...READ MORE

Nov 4, 2020 in Python by anonymous
• 65,910 points
476 views
0 votes
1 answer

I am getting output - "def"

You can make a change to your ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
307 views
0 votes
1 answer

How to convert list into 2 tuple pair list?

This should work: L = [1, 2, 3, ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
5,941 views
0 votes
1 answer

How I can find array in array?

I guess the given below will b ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
319 views
0 votes
1 answer

How I can remove day and time from TimeStamp?

You can follow the below given: '{:%Y-%m}'.format(dt.strptime(str(key), '%Y-%m-%d ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
354 views
0 votes
1 answer

Why doesn't the button display below the message?

You can make use of the given ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
323 views
0 votes
1 answer

How to check the value is double in the existing data that when ever the values are double print thats value

Hey, @There, I guess regarding your query you ...READ MORE

Nov 3, 2020 in Python by Gitika
• 65,910 points
688 views
0 votes
1 answer

return [x + y for x, y in zip(a, b)]

Hello @Ahmad, Could you please explain your workaround ...READ MORE

Nov 3, 2020 in Python by Gitika
• 65,910 points
562 views
0 votes
1 answer

Error: wn = trtl.Screen() AttributeError: 'Turtle' object has no attribute 'Screen

Hi, @There, It requires a very simple hack ...READ MORE

Nov 3, 2020 in Python by Gitika
• 65,910 points
2,400 views
0 votes
1 answer

Does Python have a ternary conditional operator?

Think of the conditional expression as switching ...READ MORE

Nov 2, 2020 in Python by Gitika
• 65,910 points
378 views
0 votes
1 answer

Error: Catch a thread's exception in the caller thread in Python

The problem is that thread_obj.start() returns immediately. The child ...READ MORE

Nov 2, 2020 in Python by Gitika
• 65,910 points
5,046 views
0 votes
1 answer

Error: Unhandled exception in thread started by Error in sys.excepthook:

I think the general idea of the ...READ MORE

Nov 2, 2020 in Python by Gitika
• 65,910 points
3,107 views
0 votes
1 answer

React native for frontend and python is for backend app development it is possible??

Hello @Rithika , Yes, it is possible. For example, you ...READ MORE

Oct 30, 2020 in Python by Niroj
• 82,880 points
5,887 views
0 votes
1 answer

How to install PyTorch?

Here are the steps you can follow:  Install Python. ...READ MORE

Oct 29, 2020 in Python by Gitika
• 65,910 points
972 views
0 votes
1 answer

What is the basic difference between T-Test, Z-Test, Chi-Square and Annova test?

If we are using one numerical variable ...READ MORE

Oct 29, 2020 in Python by Gitika
• 65,910 points
520 views
0 votes
1 answer

How do I update the file name itself in python?

Consider I as the integer value  Increment ...READ MORE

Oct 29, 2020 in Python by anonymous
• 65,910 points
368 views
0 votes
1 answer

i am getting an error on pycharm while installing packages

Hi, @There, $ pip install gevent --pre $ pip ...READ MORE

Oct 27, 2020 in Python by Gitika
• 65,910 points
2,155 views
0 votes
1 answer

Help please on basic python web server

Hi, @There, The error is because there is ...READ MORE

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

position error

Hi, @There, The key error generally means the ...READ MORE

Oct 23, 2020 in Python by Gitika
• 65,910 points
819 views
0 votes
1 answer

Is python partially compiled and partially interpreted?

Hi, @Sonali, You can check this out https://www.edureka.co/community/6776/compiled-vs-interpreted-languages, as ...READ MORE

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

ERROR: PyAudio-0.2.11-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.

Hi, @Henll, You should download the version that ...READ MORE

Oct 22, 2020 in Python by Gitika
• 65,910 points
3,673 views
+1 vote
1 answer

How to change the order of DataFrame columns in pandas?

Hi@akhtar, You can rearrange a DataFrame object by ...READ MORE

Oct 20, 2020 in Python by MD
• 95,440 points
646 views
0 votes
1 answer

How to filter Pandas DataFrame by values of columns?

Hi@akhtar, You can filter Pandas Dataframe with the ...READ MORE

Oct 20, 2020 in Python by MD
• 95,440 points
853 views
0 votes
1 answer

what is if __name__ =='__main__: in python

Hello @Joy, '__main__' is the name of the scope ...READ MORE

Oct 20, 2020 in Python by Niroj
• 82,880 points
445 views
0 votes
1 answer

Code for motion detection with opencv Youtube tutorial please

Hey, @Ashay, You can even go through this: https://www.youtub ...READ MORE

Oct 19, 2020 in Python by Gitika
• 65,910 points
459 views
0 votes
1 answer

AssertionError: <class 'numpy.ndarray'>

Hi, @There, The traceback module and sys.exc_info are ...READ MORE

Oct 19, 2020 in Python by anonymous
• 65,910 points
1,733 views
0 votes
1 answer

El return solo me devuelve False en este método

Hola amiga como estas La función no devuelve ...READ MORE

Oct 19, 2020 in Python by Gitika
• 65,910 points
331 views
0 votes
1 answer

How to read a HDF file with Pandas?

Hi@akhtar, You can read an HDF file using ...READ MORE

Oct 18, 2020 in Python by MD
• 95,440 points
1,685 views
0 votes
1 answer

How to write a HDF file from a DataFrame?

Hi@akhtar, Hierarchical Data Format (HDF) is a set ...READ MORE

Oct 18, 2020 in Python by MD
• 95,440 points
1,098 views
0 votes
1 answer

How to remove a file using the OS module in Python?

Hi@akhtar, In Python, you can use the os. remove() method to remove ...READ MORE

Oct 18, 2020 in Python by MD
• 95,440 points
880 views
0 votes
1 answer

How to save a Pandas Dataframe to a pickle file?

Hi@akhtar, Python pickle module is used for serializing ...READ MORE

Oct 18, 2020 in Python by MD
• 95,440 points
5,142 views
0 votes
1 answer

IndentationError: expected an indented block

Hi, @Baker, Putting in extra space or leaving ...READ MORE

Oct 19, 2020 in Python by Gitika
• 65,910 points
993 views
0 votes
1 answer

FileNotFound error

PATH is an issue here. It should ...READ MORE

Oct 16, 2020 in Python by anonymous
• 65,910 points
479 views
0 votes
1 answer

What is the difference between visual studio and idle in python programming??

Both are actually IDE-s I don't know ...READ MORE

Oct 16, 2020 in Python by Gitika
• 65,910 points
699 views
0 votes
1 answer

TypeError :Cannot cast Index to dtype int

use numpy  and use .astype(np,int) instead of ...READ MORE

Oct 15, 2020 in Python by Gitika
• 65,910 points
1,356 views
0 votes
1 answer

TypeError: Expected Ptr<cv::UMat> for argument '%s' ''

src is the first argument to cv2.cvtColor. The error you ...READ MORE

Oct 15, 2020 in Python by anonymous
• 65,910 points
7,390 views
0 votes
1 answer

Can’t import TensorFlow. Could not find a version that satisfies the requirement TensorFlow

Basically, a solution would be to install ...READ MORE

Oct 15, 2020 in Python by anonymous
• 65,910 points
4,995 views
0 votes
1 answer

How to install voice recognizer in python?

You can install the Speech Recognition library ...READ MORE

Oct 15, 2020 in Python by anonymous
• 65,910 points
493 views
0 votes
1 answer

Error is "invalid literal for int() with base 10: ' ' "

This error is caused because we try ...READ MORE

Oct 15, 2020 in Python by Gitika
• 65,910 points
2,707 views
0 votes
1 answer

How to convert a list into an array in Python?

Hi@akhtar, You need to import the NumPy module ...READ MORE

Oct 15, 2020 in Python by MD
• 95,440 points
1,415 views