Skip to main content
1 vote
2 answers
95 views

I have a dataset with a column of groups, dates, day of the week and some data columns. For each date in each group, I want to work out the same day average from the last 3 weeks. I've been scratching ...
Emi OB's user avatar
  • 3,405
2 votes
3 answers
85 views

I have read close to all posts about this topic now but I can get it working, so sorry if you find this similar to other questions, but I can't just solve it based on existing posts. I find it very ...
NewDev's user avatar
  • 99
Advice
0 votes
1 replies
37 views

I have a set of TSV files that are filled by serializing pandas dataframes built on the responses I get from querying a large database using GraphQL. In the response I get, I have a field that hosts ...
jhlegarreta's user avatar
-2 votes
2 answers
89 views

I am trying to save a string that will be used as a formula in google sheets. import os import re from pathlib import Path import pathlib import glob import gspread from pydrive2.auth import ...
Steve's user avatar
  • 7
1 vote
1 answer
85 views

I'm working on a project to develop a simple app, based on a Python script for data analysis, using PyQt6 to format the app, and using Nuitka to create an exe. (Yes, I've tried using PyInstaller. My ...
Andrew B's user avatar
3 votes
1 answer
73 views

hist_df_2["time"] = hist_df_2.apply(lambda row : hist_df_2['timestamp'].replace(str(hist_df_2['date']), ''), axis=1) I tried this to remove the date part from the timestamp. However, for ...
DivineBanana's user avatar
1 vote
1 answer
126 views

I'm working with a large Pandas DataFrame and a multi-dimensional NumPy array. My goal is to efficiently "broadcast" a specific column of the DataFrame across one or more dimensions of the ...
MintForge π's user avatar
-1 votes
0 answers
82 views

Say I have a pandas dataframe of > 2 columns and > 2 rows, I want to apply a function, such as a datatype conversion, to each element in at least two columns. I would like for it to be efficient,...
Jerry Sizzler's user avatar
5 votes
3 answers
247 views

How can I query columns that are lists or dicts? Here is some basic JSON-like data. [ { "id": 1, "name": "John Doe", "age": 30, &...
LayneSadler's user avatar
  • 6,161
-1 votes
0 answers
41 views

I'm trying to replace the value in a dataframe column with the partial value from another dataframe column and not having any luck. I have this: import pandas as pd df = pd.DataFrame({'Action': ['set'...
surge3333's user avatar
  • 195
1 vote
3 answers
114 views

if I have saved a data frame using pickle in a binary file how can I access it? def create_dataset(path): """ creates an binary file with dataset saved in it. "&...
Prince Khatri's user avatar
-3 votes
2 answers
111 views

I’m trying to write a Python script that allows the user to input the name of a column and then prints the value counts of that column from a pandas DataFrame. Here's what I currently have: def ...
user32044318's user avatar
0 votes
1 answer
56 views

The problem appears when i have a big amount of values in my pandas df. When i take 27 or 54 values(1 or 2 columns) it works normaly, but when i take more columns it gives me this erorr (i import gs ...
Oleksii Korna's user avatar
3 votes
2 answers
110 views

I am trying to convert a column of pd.Timestamp objects into a columns of type str where the dates are encoded in ISO format. The class pd.Timestamp has the handy classmethod .isoformat() that does ...
SeF's user avatar
  • 4,329
1 vote
1 answer
107 views

When pandas.read_excel(), df.to_excel(), geopandas.read_file() and gdf.to_file() are called in a certain order in different environments, pd.read_excel() sometimes causes "Kernel has died" ...
Azrael_DD's user avatar
  • 293

15 30 50 per page