Questions tagged [python-3.x]
USE ONLY IF YOUR QUESTION IS VERSION-SPECIFIC. For questions about Python programming that are specific to version 3+ of the language. Use the more generic [python] tag on all Python questions. Use the [python-2.x] tags for Python 2 questions.
316,858
questions
-1votes
0answers
19views
How to create an "Open with..." script in python [closed]
I was wondering if there is a way to create a script that would do the same thing as right-clicking on a file and opening it with a specific program. I am trying to convert a .dlg.gz file to a .dlg ...
0votes
0answers
10views
PERFORMANCE: FASTER WAY for creating sub-dataframes for unique values of a column using Python multiprocessing
ISSUE: I need help with my below problem where I need to create sub-dataframe from a large dataframeframe for each unique value of ‘USER’ column and do some processing. This should be done very FAST, ...
0votes
0answers
8views
Pylint Wrong or no encoding specified
I'm maintinaing a library of python code. All bar one of the modules in the library runs through pylint with no problems. For this one module pylint returns error F0010. <some_module>.py:1: [...
0votes
0answers
10views
Python3 fabric2 call function with-in python program
I have my fabfile.py like this. this I run with 'fab2 deploy` in command line. from fabric2 import task hosts = ["host1"]
@task(hosts=hosts) def deploy(c): with c.cd("/tmp"): ...
0votes
0answers
7views
Pick image from rss-feed
I'm not good with python. It's not my cup of tea, but I do have a problem. I would like to have the pictures to go with the news texts. The structure of the rss feeds in the United States and England ...
-2votes
0answers
17views
Integration of scale bars on time series decomposition plots
I recently saw an article where I unfortunately can't track the author to raise the question directly. So he performed a regular time series decompoensation with R where he was able to insert a bar (...
0votes
2answers
15views
When read lists from text file into pandas dataframe column face ` ParserError: Error tokenizing data. C error: Expected 16 fields in line 3, saw 21 `
I have a text file called tropical.txt that have multiple lists that looks like this ['papaya', 'mangosteen', 'banana'] [] ['coconut', 'mango'] How can I read it into a pandas dataframe such that my ...
0votes
0answers
6views
Looking up rows in csv file for an index column and pasting the corresponding values to a line under it using Python
My title is confusing so I'll try to elaborate. I have a set of data that essentially a side-by-side display of similar entities and I'm trying to get the data from the right side of the spreadsheet ...
0votes
0answers
12views
multiprocessing.pool.ThreadPool does not work as expected
I am working on a code to do multithreaded programming and I have the following problem. When I send, for example, 20 thousand "tramas" to the server and I define that I am going to use 20 ...
0votes
0answers
5views
Display the aspect ratio of a mesh using contour plots in python
I have a rectangular grid with quad cells and I would like to compute the aspect ratio ( defined as AR = length of the cell/width of the cell) and display it using a contour plot. Here is an example ...
-1votes
0answers
26views
Basic error : integer object not callable
s = 9 s1 = int(s)
TypeError: 'int' object is not callable Can anyone explain why I am getting this error?, I referred to multiple replies but was not clearly explained.
0votes
0answers
10views
os.major() and os.minor() on block device incorrect?
Using Python 3.9.2 on Linux I try to find major and minor device numbers of a block device, e.g. /dev/sda. For result checking I first note the expected result using shell utils: $ ls -ltr /dev/sda ...
-2votes
0answers
25views
mat1 and mat2 shapes cannot be multiplied (2x3072 and 4x10)
I have the following network: class bmodel(nn.Module): def __init__(self, input_d, hidden_d, output_d): super().__init__() self.linear_relu_stack = nn.Sequential( ...
-3votes
0answers
39views
when i run this code it shows an error TypeError: object of type 'Response' has no len() [duplicate]
from bs4 import BeautifulSoup import requests response = requests.get('https://news.google.com/topstories?hl=en-IN&gl=IN&ceid=IN:en') soup = BeautifulSoup(response, 'lxml') artical = soup....
0votes
0answers
46views
Compare two list of dictionaries and get difference
I am new to python. In Python, I want to compare two list of dictionaries Below are 2 list of dictionary I want to compare based on key which is "zrepcode" and id which is the number "1&...