Trending questions in Python

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
765 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
665 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,500 views
0 votes
1 answer

How do I draw a semi-circle only using turtle - Python

Try this: import turtle turtle = turtle.Pen() turtle.left(90) for x in ...READ MORE

Jul 6, 2019 in Python by Bheem
9,478 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
494 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,637 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 637 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,136 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,360 points
526 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
4,923 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,950 points
7,481 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,438 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,040 points

edited Jun 26, 2019 by Kalgi 9,562 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
• 580 points
694 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,067 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,380 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
543 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
8,986 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,090 points
22,703 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
1,803 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
12,956 views
0 votes
2 answers

How do you read from a file using file handling in python?

for write, read,append data in file check ...READ MORE

Jun 21, 2020 in Python by sahil
• 580 points
924 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,587 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,502 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,027 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
4,837 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,633 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,568 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
641 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
2,645 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,360 points
561 views
0 votes
1 answer

Python strftime- date without leading 0?

If you add a hyphen between the ...READ MORE

Dec 31, 2018 in Python by SDeb
• 13,300 points
16,632 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
• 580 points
859 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,090 points
20,702 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
7,815 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,325 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,162 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
1,913 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 12,465 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
946 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
12,201 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
7,757 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,432 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,210 points
10,288 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,188 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
2,849 views
0 votes
2 answers

How can I rename multiple files in a certain directory using Python?

import os from optparse import OptionParser, Option class MyOption ...READ MORE

Jul 29, 2020 in Python by The real slim shady
4,445 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,210 points
14,663 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
6,804 views