Most voted questions in Python

+1 vote
1 answer

Pressing "ENTER" in Instagram search box Python Selenium

driver.get("https://www.instagram.com/explore/tags/" + hashtag + "/") You will not ...READ MORE

Nov 5, 2020 in Python by vinnie Irvine

reshown Nov 5, 2020 by Sirajul 1,598 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,482 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
508 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 631 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,551 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
618 views
+1 vote
0 answers

ValueError: could not broadcast input array from shape (2) into shape (5) [closed]

I was implementing gillespie algorithm and when ...READ MORE

Dec 23, 2019 in Python by anonymous
• 130 points

reshown Jan 13, 2020 by Kalgi 3,660 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
924 views
+1 vote
0 answers

TypeError: only integer scalar arrays can be converted to a scalar index

import cv2 import numpy as np import matplotlib.pyplot as ...READ MORE

Dec 18, 2019 in Python by sandeep
• 130 points
7,167 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,552 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,590 views
+1 vote
1 answer

How do I use the data of an array after splitting it?

Hey, You can use  np.greater(b, f) np.greater_equal(b, f) np.less(b, f) np.less_equal(b, ...READ MORE

Dec 9, 2019 in Python by Payal
526 views
+1 vote
0 answers

I have to write 2 triangles in one raw (python)

I have two triangles that has to ...READ MORE

Dec 4, 2019 in Python by מיקה
• 130 points
687 views
+1 vote
2 answers

Replace every character of string by character whose ASCII value is K times more than it

Refer below code for your problem statement def ...READ MORE

May 17, 2020 in Python by Kumar Sambhawam

edited May 18, 2020 by Gitika 16,715 views
+1 vote
0 answers

ssh db connection using python2.7

I am supposed to use python 2.7 ...READ MORE

Nov 22, 2019 in Python by sweta
• 130 points
714 views
+1 vote
0 answers

Sum the values of column matching and not matching from a .txt file and write output to a two different files using Python

Name                                                    value DR_CNDAOFSZAPZP_GPFS_VOL.0 139264 DR_CNDAOFSZAPZP_GPFS_VOL.1 15657 DR_CNDAOFSZAPZP_GPFS_VOL.0 139264 DR_CNDAOFSZAPZP_GPFS_VOL.1 156579 DR_CNDAOFSZAPZP_GPFS_VOL.2 156579 DR_CNDAOFSZAPZP_GPFS_VOL.3 ...READ MORE

Nov 20, 2019 in Python by Sagar
• 130 points
968 views
+1 vote
0 answers

How to make python selenium program to perform certain actions depending upon the web interface response?

Hi All, I am trying to download files ...READ MORE

Nov 17, 2019 in Python by varunanand
• 130 points
468 views
+1 vote
1 answer
+1 vote
0 answers

Select by date to change value

df_subset looks like this: ...READ MORE

Nov 9, 2019 in Python by Gkeace
• 130 points
622 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, 2019 in Python by Kalgi
• 52,360 points
2,112 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, 2019 in Python by Saira
2,975 views
+1 vote
2 answers

Python error "ZeroDivisionError: float division by zero"

The error is thrown in this line matchPercentage ...READ MORE

May 21, 2020 in Python by Prabhakar
22,739 views
+1 vote
1 answer
+1 vote
3 answers

AttributeError: 'module' object has no attribute 'listen"

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

Oct 3, 2019 in Python by Liala
6,055 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, 2019 in Python by Rishi
491 views
+1 vote
1 answer

how to run list of functions using Thread?

You could import the file with function ...READ MORE

Aug 26, 2019 in Python by Vishaka
1,104 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,554 views
+1 vote
1 answer

How to install tensorflow using anaconda and python 3.7.1 on windows?

Since I am using python 3.5 so ...READ MORE

Aug 19, 2019 in Python by Arvind
• 3,040 points
8,833 views
+1 vote
2 answers

How to automate image upload from my computer to site using python-selenium?

Hey, this code worked for me: image_path=os.path.abspath('.\\folder1\\subfolder2\file1.jpg') driver.find_element_by_id("Id of ...READ MORE

Aug 19, 2019 in Python by Rishi
5,652 views
+1 vote
1 answer

Scrapping News Website

Hey @Irshad Shaikh! We don't have a ...READ MORE

Aug 8, 2019 in Python by Edureka
• 2,960 points
560 views
+1 vote
0 answers
+1 vote
1 answer

Why does print() run only after executing for loop in Python?

Your stdout is line-buffered; this means that it won't ...READ MORE

Aug 1, 2019 in Python by Neel
• 3,020 points
1,351 views
+1 vote
1 answer

How to print a pyramid of asterisks in Python?

This is one of the most frequently ...READ MORE

Aug 1, 2019 in Python by Neel
• 3,020 points
3,865 views
+1 vote
4 answers

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

Python will read data from a text ...READ MORE

Dec 14, 2020 in Python by Gitika
• 65,910 points
56,463 views
+1 vote
1 answer

Python script to compare 2 files

Refer the given code and let us ...READ MORE

Jul 31, 2019 in Python by Arpit
11,856 views
+1 vote
0 answers

ValueError help with Simple Exponential Smoothing analysis on my data set.

I'm very new, and attempting to teach ...READ MORE

Jul 31, 2019 in Python by Declan

edited Jul 31, 2019 3,898 views
+1 vote
1 answer

Can assignment operator be used to copy elements in Python?

Yes assignment operator can be used to ...READ MORE

Jul 29, 2019 in Python by Neel
• 3,020 points

edited Jul 30, 2019 by Neel 564 views
+1 vote
1 answer

i still can't find http proxy in system setting

Could be because you don't have the ...READ MORE

Jul 29, 2019 in Python by Anvi
683 views
+1 vote
1 answer

Using filter() and map() together

You are not providing the parameters in ...READ MORE

Jul 26, 2019 in Python by Wajiha
• 1,950 points
1,447 views
+1 vote
2 answers

sklearn.cross_validation import train_test_split not working

How ever now its in model selection ...READ MORE

Jul 17, 2020 in Python by karthikeyan
17,765 views
+1 vote
3 answers

How do I share global variables across modules? - python

The best way to share global variables ...READ MORE

Jul 24, 2019 in Python by Faiza
134,357 views
+1 vote
5 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
118,236 views
+1 vote
0 answers

How to close a window, and then reinitialize it using PyQt

There is a button "btn_closeWin_and_reinit"  in the ...READ MORE

Jul 10, 2019 in Python by marceepoo
• 130 points

edited Jul 22, 2019 by Kalgi 6,972 views
+1 vote
1 answer

How to save a bitmap or vector graphics image after creating a drawing with python's turtle module.

This worked for me: from Tkinter import * from ...READ MORE

Jul 6, 2019 in Python by Kyraa
7,368 views
+1 vote
1 answer

How to check if a string is in a file, using python?

Hi, Try the below given code: with open('myfile.txt') as ...READ MORE

Jul 5, 2019 in Python by Shabnam
• 930 points
1,709 views
+1 vote
1 answer

How to modify list while iterating?

Hi, You can try slice operator mylist[::3] to skip across to ...READ MORE

Jul 5, 2019 in Python by Taj
• 1,080 points
621 views
+1 vote
1 answer

Add Variables to Tuple

Use the following piece of code: ...READ MORE

Jul 4, 2019 in Python by Wajiha
• 1,950 points

edited Jul 5, 2019 by Kalgi 308 views
+1 vote
1 answer

Creating a range of dates in Python

Yes, you can do it as follows: import ...READ MORE

Jul 4, 2019 in Python by Wajiha
• 1,950 points
1,233 views