Trending questions in Python

+2 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
30,122 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
30,309 views
0 votes
1 answer

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

The following are totally acceptable in python: passing ...READ MORE

Nov 16, 2018 in Python by Nymeria
• 3,520 points
19,591 views
0 votes
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,720 points
19,481 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 in Python by Kunal
10,797 views
+1 vote
2 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 in Python by Bob
4,888 views
+1 vote
0 answers

Select by date to change value

df_subset looks like this: ...READ MORE

3 days ago in Python by Gkeace
• 130 points
5 views
0 votes
0 answers

Operands Could not be Broadcast with Shapes (19,)(0,) — KNN

I am working on how to use ...READ MORE

3 days ago in Python by sam
• 120 points
5 views
0 votes
0 answers

How can we save the extracted file in a specified folder?

While extracting the data using python selenium, ...READ MORE

5 days ago in Python by moumita
• 120 points
18 views
0 votes
11 answers

“pip install unroll”: “python setup.py egg_info” failed with error code 1

rm -rf node_modules READ MORE

Jun 27 in Python by anonymous
11,050 views
0 votes
1 answer
0 votes
1 answer
0 votes
0 answers
0 votes
1 answer

Handling request exceptions while using threads?

There are different places you can add ...READ MORE

Nov 4 in Python by Richard
42 views
0 votes
0 answers

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Hi guys i have below code . ...READ MORE

Oct 30 in Python by sumanth
• 190 points
127 views
0 votes
1 answer

How to access table which is in web (using html) and how to get the data of the table using python

Hey. You can use requests and beautifulsoup ...READ MORE

Oct 29 in Python by Shri
99 views
0 votes
1 answer

how to convert date field into UTC format (2019-10-29T19:20:30.45Z)

Hey, I think this should do what ...READ MORE

Oct 29 in Python by Niharika
87 views
+1 vote
1 answer

How can I delete a file in Python IDLE?

Hey @Starsarwar You have two different codes, they ...READ MORE

Oct 28 in Python by Kalgi
• 41,990 points
60 views
0 votes
0 answers

convert following json to csv using recursively

{  "name": "flare",  "children": [   {    "name": "analytics",    "children": [     {      "name": "cluster",      "children": [       {"name": ...READ MORE

Oct 18 in Python by ÂbhIshëk
• 120 points
172 views
+1 vote
1 answer

how do i get a optimal cutoff value(directly in the form of numeric) from roc curves?

The optimal CutOff value is the point ...READ MORE

Oct 17 in Python by Saira
120 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,520 points

edited Dec 19, 2018 by Nymeria 13,815 views
0 votes
1 answer

Install Python3 on Mac

There are two ways of installing python3 ...READ MORE

Oct 15 in Python by Yogesh
98 views
+1 vote
0 answers

Python error "ZeroDivisionError: float division by zero"

Hey! I am trying to create a ...READ MORE

Oct 9 in Python by Hannah
• 16,220 points
235 views
0 votes
0 answers

How to save the import csv file to mongodb using pyspark (or python)?

I have this code, and I want ...READ MORE

Oct 9 in Python by Ahmed
• 310 points
146 views
0 votes
1 answer

python error "AttributeError: 'NoneType' object has no attribute 'read'"

The microphone needs to be entered using ...READ MORE

Oct 3 in Python by Jack
237 views
0 votes
1 answer

Install virtualenv - python

Follow these steps to install virtualenv on ...READ MORE

Oct 7 in Python by Harshit
42 views
0 votes
1 answer

Speech recognition code - Python

Hi Hannah,  Have a look at this code: import ...READ MORE

Oct 3 in Python by Waseem
125 views
0 votes
2 answers

Python error "ImportError: No module named 'tkinter'"

sudo apt-get install python3-tk Then, >> import tkinter # ...READ MORE

3 days ago in Python by Icetutor
• 160 points
474 views
0 votes
1 answer

Google search using Python

Python provides a module called "google" with ...READ MORE

Oct 3 in Python by Tagya
118 views
0 votes
0 answers

Python error "ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv."

I tried upgrading pip using the following ...READ MORE

Oct 3 in Python by Hannah
• 16,220 points
157 views
0 votes
1 answer
0 votes
1 answer

Python error " audio = sr.listen(source) AttributeError: 'module' object has no attribute 'listen'"

You'll have to install the pyaudio module ...READ MORE

Oct 3 in Python by Liala
78 views
0 votes
1 answer

python error " r = sr.Recognizer() AttributeError: 'module' object has no attribute 'Recognizer'"

Hey @Hannh, I had a similar issue. ...READ MORE

Oct 3 in Python by Farheen
48 views
0 votes
1 answer

Python error "ImportError: No module named SpeechRecognition"

Hi @Hannah, replace  import SpeechRecognition as sr with import speech_recognition ...READ MORE

Oct 3 in Python by Yamini
17 views
0 votes
0 answers

KNN algorithm on iris dataset

Hi guys can i please get some ...READ MORE

Sep 26 in Python by anonymous
• 120 points
44 views
+1 vote
1 answer

ModuleNotFoundError: No module named 'Crypto'

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

Aug 20 in Python by Raman
1,397 views
0 votes
1 answer

How I do get the data from the <font> tag from a given tr tag?

This should work: from bs4 import BeautifulSoup html_doc='''<tr id="tr_m_1570:240HJY" ...READ MORE

Sep 18 in Python by Omkar
• 67,660 points
31 views
+1 vote
1 answer

I wanted to change the entire row where index is 9 how can i do that

Import the file as a pandas dataframe ...READ MORE

Sep 16 in Python by Rishi
54 views
0 votes
1 answer

How to install tkinter in pycharm?

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

Apr 3 in Python by Jishan
7,214 views
0 votes
1 answer

How to easily install python ldap in linux?

python-ldap provides an object-oriented API to access LDAP directory ...READ MORE

Sep 16 in Python by Neel
• 3,010 points
97 views
0 votes
1 answer

What is the easiest way to concatenate two lists in Python?

You can use the + operator to combine them: list1 ...READ MORE

Sep 16 in Python by Neel
• 3,010 points
51 views
0 votes
1 answer

How to write a python script for downloading a video from YouTube and saving it to a directory?

First download pytube using the following code  pip ...READ MORE

Sep 4 in Python by Neel
• 3,010 points
458 views
0 votes
1 answer

Can some one explain k-means algorithm with examples?

What is K-means Clustering? K-means (Macqueen, 1967) is ...READ MORE

Sep 9 in Python by Arvind
• 2,960 points
71 views
0 votes
1 answer

How to import json file to mongodb using pyspark (or python)?

You can use the same format as ...READ MORE

Sep 9 in Python by Karan
97 views
0 votes
1 answer

How to get score of prediction from random forest?

Well, there's a built-in method for this ...READ MORE

Sep 9 in Python by Arvind
• 2,960 points
35 views
0 votes
0 answers

What is the difference between == and is operator in python?

What is the basic use of is ...READ MORE

Sep 9 in Python by Waseem
• 4,470 points
43 views
0 votes
0 answers

What is operator overloading in python?

Can you give an example? READ MORE

Sep 9 in Python by Waseem
• 4,470 points
26 views
0 votes
0 answers

why iam getting this error

Sep 8 in Python by NEELAPALA
• 120 points

reopened Sep 9 by Omkar 34 views