Trending questions in Python

+1 vote
3 answers

How to fix this? ValueError: invalid literal for int() with base 10 error in Python

The error message invalid literal for int() ...READ MORE

Apr 29 in Python by warrenfelsh
• 140 points
71,570 views
+4 votes
6 answers

What exactly is the function of random.seed() in python?

The seed method is used to initialize the ...READ MORE

Oct 29, 2018 in Python by Rahul
72,477 views
0 votes
3 answers

In Python, what is difference between Array and List?

Lists and arrays are used in Python ...READ MORE

Mar 15, 2019 in Python by Taj
• 1,060 points

edited Mar 18, 2019 by Omkar 52,762 views
+2 votes
11 answers

How to print array/ list without brackets in python?

print(*names, sep = ', ') This is what ...READ MORE

Dec 10, 2018 in Python by Sudo
66,874 views
0 votes
1 answer

How to change/update cell value in Python Pandas dataframe?

You can use the at() method to ...READ MORE

Apr 8, 2019 in Python by Kunal
51,094 views
+1 vote
3 answers

Python error "ERROR: Could not find a version that satisfies the requirement PyQt4 (from versions: none)"

You cannot install PyQt directly from pip. ...READ MORE

Jul 22, 2019 in Python by Bob
32,793 views
+1 vote
1 answer

How can I use python to execute a curl command?

For sake of simplicity, maybe you should ...READ MORE

Oct 11, 2018 in Python by charlie_brown
• 7,760 points
41,494 views
+1 vote
1 answer

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

You have to use the encoding as latin1 ...READ MORE

Jul 11, 2019 in Python by Ritu
28,362 views
+1 vote
1 answer

UnicodeDecodeError: "utf-8" codec can't decode byte in position : invalid start byte

You have to use the encoding as latin1 ...READ MORE

Jul 23, 2019 in Python by Kunal
27,428 views
0 votes
1 answer

Python Pandas error: AttributeError: 'DataFrame' object has no attribute 'rows'

There is no attribute called “rows”. The ...READ MORE

Mar 28, 2019 in Python by Shri
26,925 views
+1 vote
2 answers

How to install tkinter in pycharm?

Ya, this is a problem with installing ...READ MORE

Apr 3, 2019 in Python by Jishan
19,810 views
0 votes
1 answer

How to get the return value from a thread using python?

You don't need to change your existing ...READ MORE

Dec 3, 2018 in Python by Nymeria
• 3,540 points

edited Dec 19, 2018 by Nymeria 30,046 views
0 votes
3 answers

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

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

May 12 in Python by anonymous

edited May 13 by Gitika 14,857 views
0 votes
1 answer

Python Pandas: ValueError: DataFrame constructor not properly called!

The syntax is not right. The right ...READ MORE

Mar 28, 2019 in Python by Ritu
23,786 views
0 votes
3 answers

Python error "NameError: name 'sr' is not defined"

NameError: name 'xx' is not defined Python knows ...READ MORE

Mar 19 in Python by rahul
• 320 points
18,189 views
0 votes
2 answers

Python error "IndentationError: expected an indented block"

Putting in an extra space or leaving ...READ MORE

Mar 2 in Python by evanbung
• 180 points
13,950 views
+1 vote
3 answers

What do you mean by python scripting? What is a script and a module in python?

A module is a file containing a ...READ MORE

Jun 17, 2019 in Python by Zain Abbas
25,933 views
+1 vote
1 answer

Python: convert txt file to csv format with rows and columns

This code should work. You have to ...READ MORE

Aug 1, 2019 in Python by Ashish
14,902 views
+2 votes
1 answer

ModuleNotFoundError: No module named 'Crypto'

The module you’ve installed is different. To install ...READ MORE

Aug 20, 2019 in Python by Raman
13,534 views
0 votes
1 answer

Python error: unsupported operand type(s) for -: 'str' and 'str'

Hi. This error is caused because you ...READ MORE

May 12, 2019 in Python by Anjali
17,733 views
0 votes
2 answers

How to read Pandas csv file with no header?

Use this logic, if header is present ...READ MORE

Mar 14 in Python by Shahabuddin
• 140 points
11,313 views
0 votes
1 answer

How to save graph using matplotlib library?

Hi@akhtar, You can find one function called savefig ...READ MORE

4 days ago in Python by MD
• 21,340 points
116 views
0 votes
1 answer

understand this error:AttributeError: 'Turtle' object has no attribute 'Listen'. Any ideas?

Hey, @Mohammed, You are getting this error because ...READ MORE

5 days ago in Python by Gitika
• 28,810 points
146 views
0 votes
0 answers

Module not callable in python in the following code?

mport pandas as pd import xlsxwriter as xw input_string ...READ MORE

3 days ago in Python by Ratan
• 120 points
77 views
0 votes
1 answer

Error:SSL backend error when using OpenSSL

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

5 days ago in Python by Niroj
• 20,510 points
128 views
0 votes
1 answer

Error: when install pylibmc using pip

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

5 days ago in Python by Niroj
• 20,510 points
124 views
0 votes
1 answer

AttributeError: 'numpy.ndarray' object has no attribute 'append'

Hi@akhtar, If you trying to append data in ...READ MORE

May 5 in Python by MD
• 21,340 points
742 views
0 votes
1 answer

How can we remove an element from dic type variables. Eg : a={'A' : 2 , 'K' : 4 , 'D' : 6} }

Hey, @Kanishka, Suppose your dict contains: a={'A' : 2 ...READ MORE

5 days ago in Python by Gitika
• 28,810 points
84 views
0 votes
0 answers

I am trying to build a pong game this is what they showed me.

import turtle wn = turtle.Screen() wn.bgcolor("blue") wn.tracer(0) #Paddle A paddle_a = turtle.Turtle() paddle_a.speed(0) paddle_a.shape("square") paddle_a.color("red") paddle_a.ShapeSize paddle_a.penup() paddle_a.goto(-350, ...READ MORE

3 days ago in Python by Praise
• 120 points

edited 16 hours ago by Gitika 25 views
0 votes
1 answer

AttributeError: 'numpy.ndarray' object has no attribute 'append'

Hi, You created two empty list. And in ...READ MORE

May 17 in Python by MD
• 21,340 points
198 views
0 votes
1 answer

Error:Pip install Matplotlib error with virtualenv

Hello @kartik, To generate graph in png format ...READ MORE

5 days ago in Python by Niroj
• 20,510 points
42 views
0 votes
1 answer

'numpy.ndarray' object has no attribute 'append'

Hi@Noman, You created two empty list. And in ...READ MORE

May 17 in Python by MD
• 21,340 points
170 views
0 votes
1 answer

driver.find_elements_by_css_selector("input[placeholder='from']").send_keys("del") AttributeError: 'list' object has no attribute 'send_keys'

Hey, @Nupur, You are getting a list of web elements ...READ MORE

5 days ago in Python by Gitika
• 28,810 points
30 views
+1 vote
0 answers

TypeError: unsupported operand type(s) for /: 'list' and 'list'

This is my part of code, why ...READ MORE

May 17 in Python by anonymous
• 200 points

edited May 18 by Gitika 141 views
0 votes
1 answer

Error:django MultiValueDictKeyError

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

5 days ago in Python by Niroj
• 20,510 points
17 views
+1 vote
0 answers

ValueError: operands could not be broadcast together with shapes (3,) (1000,)

This is the part of my code, why ...READ MORE

May 17 in Python by anonymous
• 200 points

edited May 18 by Gitika 120 views
0 votes
0 answers

TypeError: only size-1 arrays can be converted to Python scalars

This is my code for key in bboxes: bbox ...READ MORE

6 days ago in Python by Rumia
• 120 points

edited 6 days ago by Gitika 84 views
0 votes
0 answers

How do I fix this Set function in python?

I have the following code below I ...READ MORE

6 days ago in Python by Olufemiodubote
• 120 points
36 views
0 votes
2 answers

what is the difference between append and insert in python lists?

There is a simple difference between append ...READ MORE

Jun 22, 2019 in Python by Harshdeep Khatke
10,533 views
0 votes
0 answers

number of occurrence counting in a string

Write a function called number_of_occurrences that takes ...READ MORE

May 16 in Python by Anny
• 120 points
71 views
0 votes
1 answer

How to load a custom JS file in Django admin home?

Hello @kartik, You can override templates/admin/index.html and add the JavaScript ...READ MORE

May 14 in Python by Niroj
• 20,510 points
78 views
0 votes
1 answer

How to clone or copy a list?

Hello @kartik, With new_list = my_list, you don't actually ...READ MORE

May 14 in Python by Niroj
• 20,510 points
66 views
+1 vote
1 answer

ModuleNotFoundError: No module named 'cv2'

Hi@akhtar, This error may occur if you didn't install ...READ MORE

Apr 9 in Python by MD
• 21,340 points
1,525 views
0 votes
0 answers

name error: name 'symtr' is not globally defined

class Solution(object):     def symtr(self,root1, root2):         if(root1==None and root2==None):             return True         elif(root1==None ...READ MORE

May 14 in Python by anonymous
• 120 points
55 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 11 in Python by Niroj
• 20,510 points
71 views
0 votes
1 answer

How to Install Python packages from local file system folder to virtualenv with pip?

Hello @kartik, You can try the code below: pip ...READ MORE

May 11 in Python by Niroj
• 20,510 points
51 views
0 votes
1 answer

Import error: No module name urllib2

As stated in the urllib2 documentation: The urllib2 module has been split ...READ MORE

May 11 in Python by Niroj
• 20,510 points
28 views
0 votes
1 answer

How to re import an updated package while in Python Interpreter?

Hello, Short answer: try using reimport: a full featured reload ...READ MORE

May 11 in Python by Niroj
• 20,510 points
22 views
0 votes
1 answer

How do I remove an element from a list by index in Python?

You can use the pop() method to ...READ MORE

Jun 21, 2019 in Python by Nisa
• 1,090 points
14,066 views
0 votes
1 answer

How do I log a Python error with debug information?

Hello @kartik, I am printing Python exception messages ...READ MORE

May 11 in Python by Niroj
• 20,510 points
20 views