Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Should I use "skipped" or NaN for empty cells in columns for analysis?

I have a dataset with columns for organisms and drugs. For each organism, only some drugs are given, and skipped drugs are empty cells. The skipped values are meaningful (i.e., drug not given to ...
yukku alahari's user avatar
-1 votes
1 answer
50 views

Flet error while building Windows application

Every time I try to use the command "flet build windows" in the same folder where my main.py source code is, I get the error shown in the screenshot. I've already downloaded Visual Studio ...
Eric's user avatar
  • 21
0 votes
0 answers
44 views

Switching over from Spyder to VSCode

I am a long time user of Spyder to do data science with Python. At work I am trying to switch over to VSCode so that I can benefit from AI tools such as Amazon Q. So far I can not put together a set ...
lonestar79's user avatar
-1 votes
0 answers
20 views

Yahoo-oauth library fails to load secrets.json/oauth2.json; repeatedly prompts for verifier code (Python/PyCharm)

I'm trying to automate retrieving fantasy data using the yahoo-oauth and yahoo-fantasy-api libraries in Python. My script runs fine after I manually enter the verifier code, and the secrets.json file ...
Bcnea's user avatar
  • 1
0 votes
0 answers
51 views

How to check where C API is looking for Python?

I'm trying to embed Python in C++, and I've tried to compile and run the following int main() { Py_Initialize(); PyRun_SimpleString("from time import time,ctime\nprint('Today is', ctime(...
Redcrazyguy's user avatar
-2 votes
0 answers
41 views

Copying columns using loc or iloc, from one dataframe to another that is initialized with columns

Copying columns from one dataframe to another empty dataframe that is initialized with columns. Using loc the copy does not succeeds at all! Using iloc the copy succeeds only if the source dataframe ...
Minas Lyrakis's user avatar
0 votes
1 answer
30 views

Apply power to a numpy array [closed]

I have below numpy array, import numpy as np a = np.arange(25).reshape(5, 5) Now I want to multiply this say, 10 times. So I tried with np.power(a, 10) However this doesnt seem to be same as a X a X ...
Bogaso's user avatar
  • 3,753
-3 votes
0 answers
29 views

withdraw and collect e-commerce order amounts

This code helps me total and list the daily, weekly, and monthly amounts of Trendyol package orders from three different stores. However, the weekly and monthly totals, in addition to the daily totals,...
Mehmet Can Özkan's user avatar
1 vote
0 answers
34 views

PyQt6: keep widget width in a layout equal

I have a main layout in PyQt6 with a left and right side (QHBoxLayout containing two elements). I want both sides to always be 50% of the main window width. However, when a widget on the left side ...
Tomper's user avatar
  • 88
0 votes
1 answer
38 views

Python in vscode does not autocomplete or suggest built in class method

I am using vscode for Python dev. I have the Microsoft Extensions (Pylance, Python, Python Debugger, PythonEnviroments) installed and working. The issue is when I try to make a metaclass in vscode ...
Free Man's user avatar
0 votes
0 answers
31 views

Image stacking using xarray [closed]

I am trying to stack images of different bands i.e SAR+RGB+slope+ MNDWI. I am working in Python. When I stack all images then normalize it the mean values of rgb.nir and slope come out to very large ...
amna aly's user avatar
-3 votes
2 answers
53 views

Why does list iterator skip elements after in-place modification using slice assignment

I know that modifying a list while iterating over it is dangerous. For example, using my_list.remove() is a famous problem because it causes the iterator to skip the next element. However, I found a ...
Time Mahattano's user avatar
2 votes
1 answer
56 views

Calculating mean for a column of arrays in pandas

I have below pandas dataframe import pandas as pd import numpy as np dat = pd.DataFrame({ 'A': [1,2,3], 'B': [[[np.nan, 0.0, 0.0, 0.0, 0.0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], ...
Bogaso's user avatar
  • 3,753
1 vote
1 answer
45 views

Symmetric Encryption Padding Issues AES/PKCS*7/CBC [duplicate]

I am unable to determine what is causing the exception being thrown ("invalid padding bytes"). From trying to find examples of the same issue, this seems to mostly be using the incorrect key ...
Dont worry about it's user avatar
0 votes
0 answers
24 views

Python CGI script to run nmap

Need some guidance. New to CGI. I would like to execute NMAP command from a (web) server. Using Apache & configured to run Python scripts as CGI. Basic linux commands & even nmap without ...
user2809072's user avatar

15 30 50 per page
1
2 3 4 5
…
147290