Trending questions in Python

0 votes
1 answer

KeyError: "['Place'] not found in axis"

Hi@akhtar, You need to provide the axis parameter ...READ MORE

Jun 24, 2020 in Python by MD
• 95,440 points
40,004 views
0 votes
3 answers

TypeError: Index(...) must be called with a collection of some kind, 'Email' was passed

It is not working because your code ...READ MORE

May 13, 2020 in Python by anonymous

edited May 13, 2020 by Gitika 50,610 views
0 votes
3 answers

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Nadeem\AppData\Local\Temp\

You have an out of date version ...READ MORE

Dec 15, 2020 in Python by Rajiv
• 8,910 points
37,111 views
0 votes
0 answers

Python - TypeError: 'int' object is not iterable

Here's my code: import math print("Hey, lets solve Task ...READ MORE

Dec 21, 2022 in Python by erzan
• 630 points
568 views
0 votes
0 answers

What should I do with "Unexpected indent" in Python?

How do I rectify the error "unexpected ...READ MORE

Dec 22, 2022 in Python by erzan
• 630 points
319 views
0 votes
0 answers

Print without space in python 3

I'm new to Python, and I'm wondering ...READ MORE

Dec 22, 2022 in Python by erzan
• 630 points
314 views
0 votes
0 answers

Python Key Error=0 - Can't find Dict error in code

basically I have been racking my brains ...READ MORE

Dec 22, 2022 in Python by erzan
• 630 points
302 views
0 votes
0 answers

How do I update/upgrade pip itself from inside my virtual environment?

I'm able to update pip-managed packages, but ...READ MORE

Dec 21, 2022 in Python by erzan
• 630 points
323 views
0 votes
0 answers

python: SyntaxError: EOL while scanning string literal

I have the above-mentioned error in s1="some ...READ MORE

Dec 22, 2022 in Python by erzan
• 630 points
266 views
0 votes
0 answers

Function for factorial in Python

How do I go about computing a ...READ MORE

Dec 21, 2022 in Python by erzan
• 630 points
222 views
0 votes
0 answers

What do these operators mean (** , ^ , %, //)? [

Other than the standard +, -, *and / operators; but what does ...READ MORE

Dec 21, 2022 in Python by erzan
• 630 points
170 views
0 votes
0 answers

What does the "yield" keyword do?

What is the use of the yield keyword in ...READ MORE

Dec 21, 2022 in Python by erzan
• 630 points
160 views
0 votes
0 answers

Removing duplicates in lists

How can I check if a list ...READ MORE

Dec 20, 2022 in Python by erzan
• 630 points
182 views
0 votes
0 answers

Python list error: [::-1] step on [:-1] slice

I thought I understood the basics of ...READ MORE

Dec 20, 2022 in Python by erzan
• 630 points
164 views
0 votes
3 answers

How to replace negative numbers in Pandas Data Frame by zero?

 If all your columns are numeric, you ...READ MORE

Dec 16, 2020 in Python by Rajiv
• 8,910 points
43,060 views
0 votes
1 answer

How do I install the yaml package for Python?

Hello @kartik, You could try the search feature ...READ MORE

May 12, 2020 in Python by Niroj
• 82,880 points
40,794 views
0 votes
0 answers

Visualize the full chess board from the library python-chess on line command

I am working a chess game based ...READ MORE

Nov 22, 2022 in Python by sarit
• 1,830 points
856 views
0 votes
0 answers

Object Oriented Python for area of triangle

Write a Python Program(with class concepts) to ...READ MORE

Nov 22, 2022 in Python by sarit
• 1,830 points
716 views
0 votes
0 answers

Random word generator in Python

I'm essentially working on a project where ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
908 views
0 votes
0 answers

How do you move tree with ignore patterns in python

with the shutil.copytree I can copy an ...READ MORE

Nov 22, 2022 in Python by sarit
• 1,830 points
675 views
0 votes
0 answers

'for' loop in one line in Python

When I tried to use a for statement in ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
376 views
0 votes
0 answers

How can I find the first occurrence of a sub-string in a python string?

I'd like to locate the first index ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
346 views
0 votes
0 answers

python reverse phone lookup with twilio

I've been trying to figure out how ...READ MORE

Nov 22, 2022 in Python by sarit
• 1,830 points
389 views
0 votes
1 answer

What is the full form of oops?

To answer your doubt, the programming paradigm ...READ MORE

Feb 8, 2022 in Python by Soham
• 9,700 points
12,735 views
0 votes
0 answers

Repeating triangle pattern in Python

Depending on the integer input, I need ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
293 views
0 votes
0 answers

Is it possible to get a list of keywords in Python?

I want to obtain a string list ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
293 views
0 votes
0 answers

How to check whether a variable is a class or not?

I was wondering how to check whether ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
246 views
0 votes
0 answers

How can I "count from the back" in python lists?

Say I have a list l = ['P','y','t','h','o','n'] I ...READ MORE

Nov 22, 2022 in Python by sarit
• 1,830 points
199 views
0 votes
0 answers

Python list error: step on slice with [:-1]

I believed I was familiar with the ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
383 views
0 votes
0 answers

In Python, how do I declare an array?

In Python, how do I declare an ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
374 views
0 votes
0 answers

Concatenating two one-dimensional NumPy arrays

How do I concatenate two one-dimensional arrays ...READ MORE

Nov 16, 2022 in Python by Ashwini
• 5,430 points
411 views
0 votes
3 answers

Best way to convert string to bytes in Python?

We can use the built-in Bytes class in Python ...READ MORE

Dec 28, 2020 in Python by David Samon
29,898 views
0 votes
0 answers

What is the primary language used to create Python?

What is the primary language used to ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
214 views
0 votes
0 answers

How to define a two-dimensional array?

The following is how I want to d ...READ MORE

Nov 17, 2022 in Python by Ashwini
• 5,430 points
201 views
0 votes
0 answers

In Python, what does a "r" mean before a string?

In Python, what does a "r" mean ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
199 views
+1 vote
1 answer

How to get the currently logged in user's user id in Django?

Hello @kartik, First make sure you have SessionMiddleware and AuthenticationMiddleware middlewares added ...READ MORE

Aug 12, 2020 in Python by Niroj
• 82,880 points
35,773 views
0 votes
3 answers

import NumPy as np ImportError: No module named NumPy

You need to install numpy using pip install ...READ MORE

Dec 16, 2020 in Python by Roshni
• 10,520 points
35,118 views
0 votes
1 answer

ValueError: could not convert string to float: id

The problem is that in your code ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
8,279 views
+2 votes
2 answers

ImportError: numpy.core.multiarray failed to import

try this... run this code one by one.... pip ...READ MORE

Nov 5, 2020 in Python by Anand Vijay Rajsri

reshown Nov 5, 2020 by Sirajul 33,999 views
0 votes
0 answers

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I am facing an error when decoding ...READ MORE

May 9, 2022 in Python by Kichu
• 19,050 points
6,975 views
0 votes
0 answers

Error: 'int' object is not subscriptable - Python

I was experimenting with a straightforward piece ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
755 views
0 votes
1 answer

How to fix error "ERROR: Command errored out with exit status 1: python." when trying to install django-heroku using pip

Just add the package containing the executable pg_config. ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
7,053 views
0 votes
0 answers
0 votes
0 answers

What does an 'r' represent before a string in python?

Why do we put a r before ...READ MORE

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

'python' is not recognized as an internal or external command [duplicate]

I recently got Python Version 2.7.5, and ...READ MORE

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

Base language of Python

What is the base language is Python ...READ MORE

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

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

'decode' is not an attribute of the ...READ MORE

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

Replacements for switch statement in Python?

I want to create a Python function ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
357 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
345 views
0 votes
0 answers

How can I convert a list to a string using Python?

How can I convert a list to ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
351 views