Trending questions in Python

0 votes
0 answers

Pyplot error "only size-1 arrays can be converted to Python scalars"

I am getting the following error while ...READ MORE

Nov 28, 2019 in Python by Sumit
• 130 points
3,736 views
+1 vote
2 answers

python nmap can't find PortScanner attribute

you want install        1.pip uninstall nmap        2.pip install python-nmap in ...READ MORE

Jan 25, 2020 in Python by Rangertech_hacker234
8,834 views
0 votes
1 answer

Use two different programs in the third

You can treat each python file as ...READ MORE

Jan 24, 2020 in Python by Priya
1,166 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, 2019 in Python by Hannah
• 18,520 points
6,055 views
+1 vote
1 answer

Python pip: “error: Microsoft Visual C++ 14.0 is required”

Seems like the setup tools for python ...READ MORE

Aug 20, 2019 in Python by Kunal
7,856 views
0 votes
1 answer

Copy constructor vs constructor

Constructor: It is a method which has the ...READ MORE

Aug 14, 2019 in Python by Wajiha
• 1,960 points
8,133 views
0 votes
1 answer

What is the logic to check if a number is prime or not in python?

n = int (input ('ENTER NUMBER TO ...READ MORE

Jul 16, 2020 in Python by amrut
• 240 points
1,073 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, 2019 in Python by Shri
4,796 views
0 votes
1 answer

How Do You Run A Python Script In Blender?

Blender is a free and open-source 3D ...READ MORE

Jul 30, 2019 in Python by Mohammad
• 3,230 points
8,683 views
0 votes
0 answers

I am trying to print each entry of the dataframe separately. The dataframe is created by the following code

import pandas as pd XYZ_web = {'Day':[1,2,3,4,5,6], 'Visitors':[1000,700,6000,1000,400,350], ...READ MORE

Jan 27, 2020 in Python by solo
• 120 points
812 views
0 votes
1 answer

Install python using Ansible

Try something like: - hosts: all remote_user: ...READ MORE

Jul 22, 2019 in Python by Travis
8,934 views
0 votes
1 answer

What exactly is invalid syntax error?

please solve this error   def TakeImages():     Id=(text.get())   ...READ MORE

Jul 20, 2020 in Python by Prince kumar
1,927 views
0 votes
1 answer

How to install openssl in python?

pip install openssl-python run this command in the ...READ MORE

Aug 2, 2019 in Python by Mohammad
• 3,230 points
8,924 views
0 votes
2 answers

how can i randomly select items from a list?

You can also use the random library's ...READ MORE

Apr 9, 2020 in Python by Patrick
5,302 views
+2 votes
0 answers

unsupported operand type error

tech_list=closingdata.pct_change() tech_list READ MORE

Jan 26, 2020 in Python by Anupriya
• 140 points
699 views
0 votes
1 answer

How to Pivot pandas for removing of some headers and renaming of some indexes?

Solution is add parameter values to pivot, then add reset_index for column ...READ MORE

Sep 27, 2018 in Python by Priyaj
• 58,020 points
21,643 views
–1 vote
1 answer

Python error saying "NameError: name 'email' is not defined"

you need to define the variable email READ MORE

Nov 29, 2019 in Python by Casper
• 160 points
6,837 views
+1 vote
1 answer

I have explained my scenario.Please suggest answer for this?

Hi @Vishal, You can simply use an if-else ...READ MORE

Jan 22, 2020 in Python by Kalgi
• 52,350 points
766 views
+1 vote
1 answer

How to convert records from csv to a list in Python?

If you are using Python 3.x then ...READ MORE

Jun 25, 2019 in Python by Arvind
• 3,050 points

edited Jun 26, 2019 by Kalgi 9,852 views
+1 vote
0 answers

taking partial screenshot with python selenium in linux [closed]

is it possible to take screenshot of ...READ MORE

Jan 21, 2020 in Python by Noor
• 200 points

closed Jan 21, 2020 by Kalgi 786 views
0 votes
1 answer

draw polygon based on user input - turtle python

Try something like this: import turtle # create a ...READ MORE

Jul 6, 2019 in Python by Umer
9,376 views
0 votes
2 answers

How to lock a thread in Python?

Lock objects can release the lock at ...READ MORE

Jul 23, 2020 in Python by sahil
• 500 points
913 views
+1 vote
1 answer

How to check if a string is null in python

Try this: if cookie and not cookie.isspace(): # the ...READ MORE

Aug 20, 2018 in Python by Priyaj
• 58,020 points
23,096 views
0 votes
1 answer

BeautifulSoup: How to get the text between p tag?

Find all the the paragraph tags and ...READ MORE

Apr 3, 2019 in Python by Esha
13,321 views
0 votes
1 answer

how do i get the list of all the keys in my dictionary?

my_dict = {'one': 'first', 'two': 'second', 'three': ...READ MORE

Sep 30, 2020 in Python by VJ_python
816 views
0 votes
1 answer

What is the difference between 2*2 and 2**2 in python?

2*2 is a multiplication operation output will ...READ MORE

Apr 12, 2020 in Python by Hari
2,135 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, 2019 in Python by Yamini
5,390 views
0 votes
1 answer

how can i use the sum function in a python list?

If there is list =[1,2,4,6,5] then use ...READ MORE

Apr 23, 2020 in Python by anonymous
3,913 views
–1 vote
1 answer

nmap.nmap.PortScannerError: 'nmap program was not found in path

python-nmap module used in python happens to use nmap binary ...READ MORE

Jan 30, 2019 in Python by Omkar
• 69,220 points
16,015 views
0 votes
1 answer

Python Selenium: ConnectionRefusedError: No connection could be made because the target machine actively refused it

When you use driver.quit(), it closes the ...READ MORE

Apr 6, 2019 in Python by Tina
13,109 views
0 votes
1 answer

How to get permutations of list or a set in Python?

Permutation is an arrangement of objects in ...READ MORE

Jul 11, 2019 in Python by Neel
• 3,020 points
8,900 views
0 votes
2 answers

Finding local IP addresses using Python's stdlib

import socket s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s ...READ MORE

Mar 30, 2020 in Python by anonymous
3,073 views
+1 vote
1 answer

Python: How to convert text to csv rows separated by a record separator?

Hi @Sumanth, try something like this: import csv with ...READ MORE

Dec 17, 2019 in Python by Pri
1,931 views
0 votes
1 answer

How to web scrape using python without using a browser?

Yes, you can use the headless mode. ...READ MORE

Apr 2, 2019 in Python by Yogi

edited Oct 7, 2021 by Sarfaraz 13,066 views
+7 votes
4 answers

What's the coolest thing you've ever done using Python?

Python is an extremely interesting language. you ...READ MORE

Nov 27, 2019 in Python by Tini
2,397 views
+1 vote
0 answers

how to match the following string without a regular expression in python

abc_pqr_0_114_004.xxx ab_pq_04_114.xxx READ MORE

Dec 17, 2019 in Python by Rajesh Babu
• 130 points
1,790 views
0 votes
2 answers

How to define a class in python?

Class use the special word  class for declaration. ...READ MORE

Jun 6, 2020 in Python by anonymous
• 500 points
1,207 views
+1 vote
0 answers

how can read text from website ??

from selenium import webdriver import time query = ('maps') if ...READ MORE

Jan 7, 2020 in Python by anonymous
• 130 points
856 views
0 votes
1 answer

USING LIKE inside pandas.query()

If you have to use df.query(), the ...READ MORE

Jul 22, 2019 in Python by SDeb
• 13,300 points
8,103 views
0 votes
1 answer

How to find if a value exists in Pandas dataframe?

Try this:​ for name in df['Name']: ...READ MORE

Apr 8, 2019 in Python by Tina
12,623 views
+2 votes
1 answer

Create column for str,contain in pandas

Hi Juzar So if I am not wrong ...READ MORE

Jan 6, 2020 in Python by Kalgi
• 52,350 points
757 views
0 votes
1 answer

How to run a Function in Spyder and check output?

You will see the output of the ...READ MORE

May 17, 2019 in Python by Omkar
• 69,220 points
10,863 views
+1 vote
1 answer

instead of using two for loops in python

This example might help: for x, y in ((a,b) ...READ MORE

Dec 24, 2019 in Python by Sumeir
1,251 views
0 votes
0 answers

attribute error in python

i kept getting attribute error in my ...READ MORE

Dec 23, 2019 in Python by anonymous
• 120 points
1,331 views
0 votes
1 answer

I am trying to view and preprocess a .mhd and .raw image types on jupyter notebook, but I am getting a syntax error.

Hey @tekle,  You cannot use a string in ...READ MORE

Nov 4, 2019 in Python by Payal
3,310 views
0 votes
1 answer

SyntaxError: Missing parentheses in call to "print".

The statement print "hello python" does not work in ...READ MORE

Jul 16, 2019 in Python by Umar
8,071 views
0 votes
1 answer

Is there a scanf() or sscanf() equivalent in python?

There is nothing as such for python. For ...READ MORE

Jul 30, 2019 in Python by Greg
7,407 views
0 votes
2 answers

How can I get the count of a list in Python?

n=[1,2,3,4,5,6,7,8,9] print(len(n)) =9 READ MORE

Dec 10, 2020 in Python by anonymous
1,489 views
+2 votes
2 answers

Google search using Python

import webbrowser search=input('Search: ') webbrowser.open('https:// ...READ MORE

Dec 25, 2019 in Python by Makhmudov
2,615 views