Trending questions in Python

0 votes
0 answers

How to fetch dropdown value is available in side the frame using python?

The frame has no name and no ...READ MORE

Oct 7, 2022 in Python by anonymous

edited Mar 4, 2025 337 views
0 votes
0 answers

How do I sort a dictionary by value?

I have some dictionary of values that ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
991 views
0 votes
0 answers

How do I reverse a list or loop over it backwards?

How can I perform a Python reverse ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
957 views
0 votes
0 answers

Does "IndexError: list index out of range" when trying to access the N'th item mean that my list has less than N items?

I'm instructing my software to print out ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
926 views
0 votes
0 answers

Reverse a string in Python

The str object in Python doesn't have ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
876 views
0 votes
0 answers

Does Python have a ternary conditional operator?

Is there a ternary conditional operator in ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
839 views
0 votes
0 answers

Java : Sort integer array without using Arrays.sort()

I have this assignment- Write java program ...READ MORE

Aug 2, 2022 in Python by krishna
• 2,820 points
2,904 views
0 votes
3 answers

i am installing wordcloud using pip but i am unable to do that ....i am getting the following error

word cloud is not supported for python ...READ MORE

Apr 15, 2020 in Python by anonymous
36,773 views
0 votes
0 answers

How to sum multiple columns until limit from other column is reached?

I have the following Pyspark dataframe. I ...READ MORE

Sep 27, 2022 in Python by anonymous

edited Mar 4, 2025 328 views
0 votes
3 answers

Python pandas: TypeError: tuple indices must be integers or slices, not str

In fact, I get a perfectly good ...READ MORE

Jun 13, 2019 in Python by Alok
53,745 views
0 votes
1 answer

EOFError: EOF when reading a line

The code: width, height = map(int, input().split()) def rectanglePerimeter(width, ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 86,360 points
6,840 views
0 votes
0 answers

How to take in the first value of a string when multiple are presented?

keyWord = ["urgent", "Linux", ...] val = input("Enter ...READ MORE

Sep 25, 2022 in Python by Edureka

edited Mar 4, 2025 327 views
0 votes
0 answers

please help with this

I need the user to type 17 ...READ MORE

Sep 25, 2022 in Python by bonicoder

edited Mar 4, 2025 262 views
0 votes
1 answer

How do I filter query objects by date range in Django?

Hello @kartik, Use Sample.objects.filter(date__range=["2020-01-01", "2020-01-31"]) Or if you are just ...READ MORE

Jun 26, 2020 in Python by Niroj
• 82,800 points
35,679 views
0 votes
0 answers

Initialising an array of fixed size in Python

I want to declare an array or ...READ MORE

Aug 11, 2022 in Python by krishna
• 2,820 points
2,110 views
0 votes
0 answers

Relative imports in Python 3

In the same directory, I wish to ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points

edited Mar 4, 2025 316 views
0 votes
0 answers

Does Python have a string 'contains' substring method?

I'm trying to find a Python string.contains ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points

edited Mar 4, 2025 308 views
0 votes
0 answers

What is the meaning of "int(a[::-1])" in Python? [duplicate]

I cannot understand this. I have seen ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points

edited Mar 4, 2025 278 views
0 votes
0 answers

'utf-8' codec can't decode byte 0x93 in position 249: invalid start byte

from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer chatbot=ChatBot('corona ...READ MORE

Sep 17, 2022 in Python by Jash

edited Mar 4, 2025 319 views
0 votes
1 answer

Error:django MultiValueDictKeyError

Hello @kartik, Use the MultiValueDict's get method. This is also ...READ MORE

May 20, 2020 in Python by Niroj
• 82,800 points
36,981 views
0 votes
1 answer

Python pip on Windows - command "cl.exe" failed

You should have  cl.exe (the Microsoft C Compiler) installed ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 86,360 points
6,138 views
0 votes
0 answers

Flattening a list of NumPy arrays?

I have data in a list type ...READ MORE

Aug 5, 2022 in Python by krishna
• 2,820 points
1,762 views
0 votes
0 answers

how do I split a large document of 10,000 words into a sub documents which contain 1000 words per each document?

There is text document of 10,000 words....I ...READ MORE

Sep 3, 2022 in Python by rakshita

edited Mar 4, 2025 298 views
0 votes
0 answers

pip3: command not found but python3-pip is already installed

I am not able to use  pip3 ...READ MORE

May 27, 2022 in Python by Kichu
• 19,040 points
4,483 views
0 votes
0 answers

matrix multiplication of arrays in python

I am having trouble finding a solution ...READ MORE

Aug 2, 2022 in Python by krishna
• 2,820 points
1,605 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,180 points
45,908 views
0 votes
0 answers

Combined mean and standard deviation from a collection of NumPy arrays of different shapes

Consider that I have a numpy array ...READ MORE

Aug 2, 2022 in Python by krishna
• 2,820 points
1,513 views
0 votes
2 answers

How to click button selenium python?

Selenium can automatically click on buttons that ...READ MORE

Oct 14, 2020 in Python by Danish Bhatiya
29,761 views
0 votes
0 answers

What are the differences between numpy arrays and matrices? Which one should I use?

What are each's advantages and drawbacks? I've noticed ...READ MORE

Aug 8, 2022 in Python by krishna
• 2,820 points
1,076 views
0 votes
0 answers

Python numpy array of numpy arrays

I have a requirement. I need to ...READ MORE

Aug 1, 2022 in Python by krishna
• 2,820 points
1,111 views
0 votes
0 answers

Sorting arrays in NumPy by column

How can I sort a numpy array ...READ MORE

Aug 2, 2022 in Python by krishna
• 2,820 points
1,006 views
0 votes
0 answers

Concatenate two numpy arrays in the 4th dimension

I got two numpy arrays in three ...READ MORE

Aug 1, 2022 in Python by krishna
• 2,820 points
945 views
0 votes
0 answers
0 votes
0 answers

while doing --channel.send('manage show '+raw1+' all a'+"\n") the "all a" taking as 2nd line so getting error

 connected to server using SSH.client and  able ...READ MORE

Aug 12, 2022 in Python by Basavraj

edited Mar 4, 2025 311 views
0 votes
0 answers

OpenCV NoneType object has no attribute shape

I  am working on Raspberry Pi with ...READ MORE

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

Python Traceback (most recent call last)

The error message: Traceback (most recent call last): ...READ MORE

May 12, 2022 in Python by Kichu
• 19,040 points
3,990 views
0 votes
1 answer

Detect and exclude outliers in a pandas DataFrame

Function definition. This handles data when non-numeric attributes ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 86,360 points
4,822 views
0 votes
0 answers

PermissionError: [Errno 13] Permission denied

This is the code : def download(): ...READ MORE

May 14, 2022 in Python by Kichu
• 19,040 points
3,924 views
0 votes
0 answers

Python - TypeError: Object of type 'int64' is not JSON serializable

My data frame has store names and ...READ MORE

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

ValueError: setting an array element with a sequence

The problem is the shape of the ...READ MORE

May 1, 2022 in Python by narikkadan
• 86,360 points
4,515 views
0 votes
3 answers
0 votes
1 answer

how to solve this IndexError: list index out of range in python and streamlit?

Hi,  @Erick, To solve the “index error: list ...READ MORE

Sep 25, 2020 in Python by Roshni
• 10,440 points
29,418 views
0 votes
1 answer

How to check if list is ascending?

How to write ascding order list READ MORE

Jul 17, 2022 in Python by A, b, g, x, z

edited Mar 5, 2025 14,631 views
0 votes
0 answers

TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array

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

May 8, 2022 in Python by Kichu
• 19,040 points
3,717 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,750 points
2,590 views
0 votes
0 answers

Flask ImportError: No Module Named Flask

I followed this flask tutorial: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world. I am getting ...READ MORE

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

iloc giving 'IndexError: single positional indexer is out-of-bounds'

I was trying to encode some information ...READ MORE

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

Constructing pandas DataFrame from values in variables gives "ValueError: If using all scalar values, you must pass an index"

If  I have two variables as follows: a ...READ MORE

May 19, 2022 in Python by Kichu
• 19,040 points
2,909 views