Trending questions in Python

0 votes
1 answer

How to replace entire column in pandas dataframe?

Use the dataframe with respective column names ...READ MORE

May 8, 2019 in Python by John
13,957 views
0 votes
1 answer

Is it possible to use variables in SQL statement in Python?

cursor.execute("INSERT INTO table VALUES (%s, %s, %s)", ...READ MORE

Aug 21, 2019 in Python by Neel
• 3,020 points
9,405 views
0 votes
1 answer

How to append dataframe without index?

You have to use the ignore_index option. ...READ MORE

Apr 1, 2019 in Python by Robert
15,530 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, 2019 in Python by Farheen
7,467 views
0 votes
0 answers

problem in sklearn

from sklearn.model_selection import train_test_split is not working ...READ MORE

Mar 9, 2020 in Python by Manjunath
• 120 points
669 views
0 votes
0 answers

main function is not working in python

import quandl as Quandl, math import numpy as ...READ MORE

Feb 18, 2020 in Python by Vasu
• 140 points
1,509 views
0 votes
1 answer

Python Pandas: selecting element in array column

pa.loc[row] selects the row with label row. pa.loc[row, ...READ MORE

May 13, 2019 in Python by SDeb
• 13,300 points
13,606 views
0 votes
1 answer

How do I obtain the index list in a NumPy Array of all the NaN values present using Python?

Hi, it is pretty simple, to be ...READ MORE

Jan 30, 2019 in Python by Nymeria
• 3,560 points
17,990 views
0 votes
2 answers

Obtaining a value when given a key in python dicionaries

Yes you can check below code dictionary = ...READ MORE

Nov 25, 2021 in Python by Suhas
933 views
0 votes
1 answer

Python error "ImportError: No module named _tkinter, please install the python-tk package"

Use the following command to install tkinter ...READ MORE

Aug 9, 2019 in Python by Chandan
9,672 views
0 votes
1 answer

Python datetime: How to change month number to month name?

You can use the datetime module to ...READ MORE

May 9, 2019 in Python by Suman
13,595 views
0 votes
2 answers

Python error "pygame.error: Couldn't open pygame.png"

add import os at top of your ...READ MORE

Sep 25, 2020 in Python by anonymous
1,691 views
0 votes
0 answers

How to start Pytest framework studying

Feb 29, 2020 in Python by Maruti
• 120 points
758 views
0 votes
2 answers

What is random.sample() method in Python?

The use of random.sample() Randomly select multiple items from ...READ MORE

Mar 13, 2020 in Python by Vishal
• 180 points
4,877 views
0 votes
0 answers

how to write unittest cases for stock prediction data

import quandl as Quandl, math import numpy as ...READ MORE

Feb 20, 2020 in Python by Vasu
• 140 points
1,068 views
+1 vote
0 answers

Error :tile cannot extend outside the image .How to save patches without this error.

def nodule_detect(nodules,j,numpyImage, numpyOrigin, numpySpacing): ...READ MORE

Jan 28, 2020 in Python by anonymous
• 150 points
1,988 views
+3 votes
0 answers

PyQt5, when I click button, it close window itself.

PyQt5, when I click button, it close ...READ MORE

Dec 9, 2019 in Python by 의철
• 150 points
3,992 views
0 votes
0 answers

Need to create rds instances under already existing subnets created in 3 az's, please help

I created subnets in three different az's. ...READ MORE

Feb 23, 2020 in Python by saiarun
• 150 points
686 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, 2019 in Python by Neel
• 3,020 points
7,549 views
0 votes
0 answers

attribute error

AttributeError: 'edureka' object has no attribute 'name' READ MORE

Feb 19, 2020 in Python by Jeya
• 120 points
733 views
0 votes
2 answers

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

a = int (input('enter number')) num = a sum ...READ MORE

Jul 16, 2020 in Python by amrut
• 240 points
1,988 views
0 votes
1 answer

Purpose of fit method in sklearn module in python?

it basically trains your model using the ...READ MORE

May 14, 2020 in Python by Mahesh
• 140 points
3,785 views
0 votes
1 answer

How can I check for NaN in Python?

math.isnan() Checks if the float x is a ...READ MORE

Aug 16, 2018 in Python by Priyaj
• 58,020 points
24,497 views
+2 votes
0 answers

Partial screenshot in Linux with Python Selenium

Taking a partial screenshot of an element by ...READ MORE

Jan 21, 2020 in Python by Noor
• 200 points
1,855 views
+1 vote
1 answer

How 2 compare words read by sys.stdin.sys() in Python 3?

Hi Alex, You could use something like this: import ...READ MORE

Jan 20, 2020 in Python by Yamini
1,940 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
10,504 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
9,257 views
0 votes
1 answer

How to convert each list item into string in a column of data frame. ?

Hey, To split a string you can use ...READ MORE

Feb 5, 2020 in Python by Roshni
• 10,480 points
1,000 views
0 votes
0 answers

How can we pass a variable value in python GOTO statement?

Alias is a runtime argument the value ...READ MORE

Feb 5, 2020 in Python by neppoliean
• 120 points
1,012 views
0 votes
1 answer

Python: XML file to pandas dataframe

Here's an example code: import pandas as pd ...READ MORE

Aug 1, 2019 in Python by Sharon
9,057 views
0 votes
0 answers

Can I get chatbot code?

Feb 5, 2020 in Python by Mahesh
• 120 points

edited Feb 5, 2020 by Gitika 957 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,355 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
9,384 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,353 views
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,798 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,176 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,954 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,970 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,918 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,157 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,669 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
22,030 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
2,139 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
9,059 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,491 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
7,116 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
856 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
790 views