Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
56 views

Trying to upgrade my python 2.7 scripts to the latest python 3.x for my PC running Windows 7-x64. To do so, I installed python 3.8.9. I get a nasty error when I press ENTER after typing "import ...
papin's user avatar
  • 81
3 votes
4 answers
194 views

I have a dataframe df that consists of two columns: an id, and a date. The id is a number from 1-3 & is not unique; the date is a datetime object. id, date 1, 2020-5-11 1, 2019-3-2 2, 2018-7-29 3, ...
NotLost's user avatar
  • 143
0 votes
1 answer
47 views

Here is the situation: I have data saved into pandas HDF5 files. Some data is compressed using lzo and some using blosc:zstd. Under RHEL-7, I was able to read both types of files. Then, I was ...
S.V's user avatar
  • 2,855
1 vote
1 answer
76 views

I’m running a Python project on a Raspberry Pi (Debian / Raspberry Pi OS, Python 3.9.2). The project has its own virtual environment (.venv), and I launch it with a script (alsv4) that starts multiple ...
May Ochia's user avatar
6 votes
4 answers
250 views

Given a table: id cost from to 43 4 2025-09-01 01:00:00 2025-09-01 01:30:00 42 4 2025-09-01 01:30:00 2025-09-01 02:00:00 41 4.8 2025-09-01 02:00:00 2025-09-01 02:30:00 40 4.05 2025-09-01 02:30:00 2025-...
Hal's user avatar
  • 131
3 votes
2 answers
314 views

I have a DataFrame, as shown below. In order to build it, I started with adding the numbers (100 for spec A Sum in 2020 and so on). Additionally I add the median as a date. 2020 ...
Stefan Bongers's user avatar
1 vote
1 answer
82 views

I have created the following pandas dataframe: ds = { 'Date' : ['2025-08-22 16:00:00', '2025-08-22 16:01:00', '2025-08-22 16:02:00', '2025-08-22 16:03:00', '2025-08-22 16:04:00', '2025-08-...
Giampaolo Levorato's user avatar
-1 votes
1 answer
98 views

I want to add the inputs in a particular row of data frame as total. But the output is XYZ: OBJECT1 Object2 NUMBERS: 1 2 Where the inputted XYZ are Object2 and OBJECT1 and the inputted Numbers are 1 ...
Hydra's user avatar
  • 19
3 votes
3 answers
156 views

I have a data frame of students sorted by grade that I want to split into 3 data frames, such that an even number of students per grade is in each of the 3 groups. I thought of it like dealing cards, ...
eriknau's user avatar
  • 31
1 vote
1 answer
168 views

I have a multi-column pandas data frame of years and corresponding cumulative rainfall values from 1 to 183 (October to March). That means in each column the last value is the maximum column value, ...
Zilore Mumba's user avatar
  • 1,594
0 votes
0 answers
76 views

This recreates ewm(adjust=True).std(): pandas ewm var and std, but I have no luck replicating the calculations in ewm(adjust=False).std(). Replicating ewm(False).mean() is easy but how is the bias ...
Luluz's user avatar
  • 103
0 votes
2 answers
137 views

I'm trying to merge two pandas DataFrames on multiple columns. It is a many-to-one relationship. There are many of the same values in df1 but only value in df2. These are the example DataFrames : df1 =...
thor's user avatar
  • 283
-2 votes
1 answer
65 views

I wanna delete missing values from a certain column: #deleting rows with missing values data_excel.dropna(subset=['Budget Betrag']) then I wanna check whether it's working with print(data_excel) But ...
Lisa Nagel's user avatar
2 votes
1 answer
84 views

I have a Spark DataFrame with the following structure: shock_rule_id DATE value A 2024-01-01 100 A 2024-01-02 null A 2024-01-03 130 B 2024-01-01 50 B 2024-01-02 null B 2024-01-03 null B 2024-01-04 80 ...
Abhishek 's user avatar
2 votes
2 answers
107 views

The csv file can contain string values to certain integer columns and I want to ignore/handle via callback if that happens, tried using on_bad_lines='skip/warn' however it gets triggered only on ...
Despicable me's user avatar
2 votes
2 answers
66 views

Using Pandas 2.3.2 on Python 3.9.2 via JupyterLab. I've collected a bunch of thermal data from a thing. I've already collated that data into DataFrame chunks that look like this: zone data ...
Brian A. Henning's user avatar
3 votes
3 answers
106 views

My csv file contains empty string "" as well as missing column values ,,. When i am loading with read_csv(), both are loaded as either empty string or NaN depending on keep_default_na and ...
Despicable me's user avatar
2 votes
1 answer
147 views

I have a dataframe with some "NaT" values in a datetime column. What does that mean? project status completed 0 windows done 2025-08-20 1 doors done 2025-08-21 2 hvac ...
wjandrea's user avatar
  • 33.9k
0 votes
1 answer
68 views

I’m trying to evaluate classification models on a highly imbalanced fraud dataset using the Brier Skill Score (BSS) as the evaluation metric. The dataset has ~2133 rows and the target Fraud_Flag is ...
Br0k3nS0u1's user avatar
3 votes
1 answer
75 views

I am trying to resample a pandas dataframe, and for some columns I would like to sum on. additionally, I want to get None/nan as result when there is no rows in a resampling period. For aggregation on ...
KamiKimi 3's user avatar
1 vote
0 answers
137 views

When I try to convert a pyspark DataFrame with a VariantType column to a pandas DataFrame, the conversion fails with an error 'NoneType' object is not iterable. Am I doing it incorrectly? Sample code: ...
Ghislain Fourny's user avatar
7 votes
3 answers
441 views

I am trying to do a somewhat complicated group and sort operation in pandas. I want to sort the groups by their values in ascending order, using successive values for tiebreaks as needed. I have read ...
Jessica's user avatar
  • 1,813
0 votes
2 answers
203 views

I have a function which processes dataframe of 6 columns. It looks like this: def Process_DF(): DF_6cols = "some data" #Two functions to split column containing Column Val1 and ...
Danylo Kuznetsov's user avatar
0 votes
1 answer
74 views

I have a data frame that consists of a column that contains the Gender data. I want to segregate it by gender and create 2 separate dataframes. I tried to do this by implementing the code below: for i ...
akhilesh mudliar's user avatar
2 votes
0 answers
248 views

I’m trying to run a small Streamlit app on my Raspberry Pi 4. For testing, I made a small version with just core functionality: # main.py import pandas as pd import streamlit as st def main(): st....
ole's user avatar
  • 11
0 votes
2 answers
93 views

This will output all csv files from the directory, but only show one of the csv dataframes. OUTPUT_PATH = "./static/output/" FILE_LIST = glob.glob("./static/*.json") def all_data():...
shrykullgod's user avatar
-2 votes
1 answer
234 views

I am facing one little problem. I am storing some date time data and the data is #secCode,secName,announcementTitle,announcementId,announcementTime 003816,xxx name,2024report,1222913141,1743004800000 ...
user824624's user avatar
  • 8,170
4 votes
1 answer
145 views

My dataframes show video game titles, platforms, year of release, revenue, etc. I have filtered the original dataframe "df_samplegames", which has 29 different platforms (type category), ...
RicardoDLM's user avatar
1 vote
0 answers
62 views

I'm working on a default style for some reports I have to do. I'd like to add the Styler.bar() method. Sample of the dataset used for integration: symbol,date,open,high,low,close,volume AAL,2014-01-02,...
ludovico's user avatar
4 votes
4 answers
572 views

I have the following frame: lst = [ ['SPXW 250715C06310000', '7/14/2025', 2.74, 2.87, 2.60, 2.65, 14, '8:30:00'], ['SPXW 250715C06310000', '7/14/2025', 2.80, 2.80, 2.50, 2.53, 61, '8:31:00'], ...
Dan's user avatar
  • 111
2 votes
1 answer
95 views

Given hemi.csv data of: 244,1000,1500,2000,2500,3000,3500,5000 0,14,18,-42,-72,-84,-86,-94,-119 12.5,277,231,185,139,144,150,161,158 25.1,416,394,370,348,361,374,404,396 37.6,483,587,633,653,566,585,...
R Schumacher's user avatar
3 votes
6 answers
282 views

I have a pandas dataframe that looks like this: A B C D 0 1 2 3 0 1 4 5 6 1 2 7 8 9 2 3 10 10 10 0 4 10 10 10 1 5 1 2 3 0 6 4 5 6 1 7 7 ...
AjWinston's user avatar
  • 129
3 votes
1 answer
105 views

After importing some nested JSON data, I'm trying to create a new dataframe from all of the dictionary key / value pairs in an existing column. Starting point: >>> df['schedules'] 0 {'...
skohrs's user avatar
  • 831
2 votes
3 answers
162 views

My code works as python file but I am struggling to make it work using pyscript.I am sharing the code which I tried. main.py import pytesseract pytesseract.pytesseract.tesseract_cmd = r"Tesseract-...
nasrin begum pathan's user avatar
1 vote
1 answer
67 views

I have bank statements in both Excel and CSV formats. The headers can vary slightly depending on the bank or the file export, for example: TRAN_DATE, CHQNO, PARTICULARS, DR, CR, BAL, SOL I want to ...
Nitesh Kumar  Singh's user avatar
2 votes
1 answer
87 views

I have a dataframe which looks like shown below: CALL_START IMSI 0 24.07.2025 12:00:51 123456888888888 1 24.07.2025 17:58:57 123456999999999 2 24.07.2025 17:05:47 ...
urosdigital's user avatar
4 votes
2 answers
106 views

So, I'm experimenting with pandas with the IMDB files, especially title.basic.tsv. When trying to parse the runtimeMinutes column to "Int64", I get an error ValueError: Unable to parse ...
red_trumpet's user avatar
4 votes
1 answer
113 views

I have the following dataframe: import pandas as pd import csv lst = [['SPXW 250715C06310000', '7/14/2025', 2.74, 2.87, 2.60, 2.65, 14, '8:30:00'], ['SPXW 250715C06310000', '7/14/2025', 2.80, ...
Dan's user avatar
  • 111
2 votes
0 answers
54 views

My post relates to this one here: Formatting a broken y axis in python matplotlib I have borrowed code from this post and adapted it to what I am doing. I am attempting to create a graph whereby I am ...
jmcgowan's user avatar
5 votes
3 answers
167 views

If I have an input.txt file: apples grapes alpha pears chicago paris london yellow blue red +++++++++++++++++++++ apples grapes beta pears chicago paris london car truck ...
yodish's user avatar
  • 881
8 votes
6 answers
558 views

I have a pandas dataframe like this: c1 c2 c3 c4 0 1 2 3 0 1 10 20 30 1 2 100 200 300 2 3 1 2 3 0 4 10 ...
AjWinston's user avatar
  • 129
0 votes
1 answer
84 views

I have a pandas DataFrame with multiple rows, and some rows have the same value in a specific column (e.g., id). I want to remove the duplicate rows while keeping only the first occurrence (or ...
Ruchin Patel's user avatar
0 votes
1 answer
67 views

I'm reading the PowerBI GetActivities and have some problems writing the data to a pandas dataFrame. A given column, called Datasets is sometimes present, and if so its a again a json object with (as ...
Harry Leboeuf's user avatar
1 vote
2 answers
133 views

I have multiple tables where it's like Column A Column B Cell 1 Cell 2 Cell 3 Cell 4 ---Blank row--- Column A Column B Cell 1 Cell 2 Cell 3 Cell 4 --- Blank row--- Column A Column B Cell 1 Cell 2 Cell ...
empowHERek's user avatar
2 votes
4 answers
173 views

I am trying to scrape dividend data for the stock "Vale" on the site https://investidor10.com.br/acoes/vale3/. The dividend table has 8 buttons (1, 2, 3, ..., 8) and "Next" and &...
user30126350's user avatar
3 votes
0 answers
142 views

I have a set of data that I am pulling from an Excel CSV. The column I am using has the timestamps in ISO 8601 format with fractional seconds (YYYY-MM-DDTHH:MM:SS.SSZ) I have tried using dateutil, ...
user31262016's user avatar
7 votes
0 answers
179 views

When a pandas DataFrame is printed, the MultiIndex column levels are aligned with the 1st (left most) column instead of the last (right most) column: import numpy as np import pandas as pd df = pd....
sds's user avatar
  • 60.5k
1 vote
2 answers
241 views

I am using Pandas (v2.2.3) to read/load a (relatively large) CSV file using read_csv(). The full file has about 500k lines. The function throws a DtypeWarning stating that "Columns have mixed ...
Andreas's user avatar
  • 113
0 votes
4 answers
241 views

I have two pandas dataframes: One assembled manually in Python, the other imported from a dashboard's .csv output. All columns in both dataframes are objects, and look like this: 2020 2021 2022 2023 0....
gorilla's user avatar
  • 47
0 votes
4 answers
174 views

I have a dataframe that has the number 6 in each row. Which will be my main number I would like to use to find values that appear most often with the number 6 that has more than 2 of the same values. ...
Chris's user avatar
  • 63