Newest 'python-3.x' Questions - Stack Overflow

Questions tagged [python-3.x]

For questions about Python programming that are specific to version 3+ of the language. Use the more generic [python] tag if your question is not version-specific. Use the [python-2.x] tags for Python 2 questions.

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

How to place a new file in a certian place on hard drive (python)

I am making a full python keylogger. It undergoes a simple processes. First store keystrokes inside a file on startup. Next, find the file and send the file across WiFi. Lastly, shutdown. For this to ...
0
votes
0answers
5 views

Prevent cursor-changed signal from running code in gtk3

I have a gtk.TreeView named text that I populate with rows of text. I want to run self.routine ONLY when I single-click on a row, or when I move the cursor with up/down keys (that is, when I actually ...
0
votes
0answers
10 views

How can I create an aggregate/summary pandas dataframe based on overlapping dates derived from a more specific dataframe?

The following dataframe shows trips made by employees of different companies: source: import pandas as pd emp_trips = {'Name': ['Bob','Joe','Sue','Jack', 'Henry', 'Frank', 'Lee', 'Jack'], '...
0
votes
1answer
19 views

why do this code add a space before appending the line?

i am trying to add new line of text on a file. Code: var1="my line 1\n " var2="my line 2\n " with open("index.txt", "a") as myfile: myfile.write(var1) myfile.write(var2) on the first run ...
0
votes
2answers
25 views

Python convert string “1-4, 7, 9-11” into list [1,2,3,4,7,9,10,11] [closed]

I would like to convert a string into an integer list using python. Some examples might be: "1-4, 7, 9-11" into [1,2,3,4,7,9,10,11] "5-9" into [5,6,7,8,9] "1,2,3,10,11" into [1,2,3,10,11] "1-3,5,6,7" ...
0
votes
1answer
23 views

Round function is truncating zero at the end in Python

a = 0.02503 print(round(a,4)) Output below when i run the above code in Python 3.0 editor. output: 0.025 But i want the output to be 0.0250, how to achieve this with proper rounding.
0
votes
0answers
7 views

How to add traces in plotly.express

I am very new to python and plotly.express, and I find it very confusing... I am trying to use the principle of adding different traces to my figure, using example code shown here https://plotly.com/...
-6
votes
0answers
32 views

I have a problem with my python none of my code is running [closed]

I am using python3.8 but for some libraries I downloaded py3.6 and now I uninstalled the python3.6 after uninstalling none of my python codes are working and I have tried with IDE's but they also ...
0
votes
1answer
12 views

TemplateDoesNotExist : Template Not being detected on Django

Thanks to land at my concern. I would be thankful if you will help me out. Earlier i was doing same procedure to fetch the template, that time working. But recently i tried to make another project, ...
1
vote
2answers
30 views

Python question — lambda version of a recursive combinations function

Okay so I have the following simple Python 3 function that does exactly what it's supposed to do: def comb(a): if len(a)==0: return[[]] else: p=[] for c in comb(a[1:]):...
0
votes
0answers
7 views

How to undersample/oversample more than two classes' dataset using “imblearn” library in Python?

I am working with "imblearn" library for undersampling. I have four classes in my dataset each having 20, 30, 40 and 50 number of data(as it is an imbalanced class). But when I try to undersample the ...
0
votes
1answer
12 views

I am trying to make a prime number generator in Python3 and the input function is not working properly

There is probably a simple answer to this, but I'm new and have no idea what I'm doing as I am learning everything from google and reddit. My code is: def primefinder(z): primenumber_list=[] ...
0
votes
1answer
20 views

Dynamic Canvas Control

I would like to change Figure according to selected QRadiobutton. In my real code , I tried various way to do that with and without signal(Also, checked other topics.). To make it looks less ...
-1
votes
1answer
16 views

How to export data to csv sequentially from multiple data frames in a sequential order

I have multiple dataframes like below. DF1: DF2 DF3 I want to store them to a file like below.So the data should be in sequential order from each dataframe. Can any one help me to find a way to ...
0
votes
0answers
8 views

Selenium Folder VS Selenium.py difference

from selenium import webdriver what does the selenium refer to? the directory or the selenium.py file. I have both in my computer. Many thanks!

15 30 50 per page
1
2 3 4 5
15442