Skip to main content
1 vote
0 answers
24 views

Plotly Express with Animation Frame: Having Issues with Legend and Displaying Points

I am trying to make a movie showing the evolution of an estimator. The idea is to draw the history of the estimator after each update. I want to do this as a movie as some updates come in out of ...
ryanh153's user avatar
  • 215
1 vote
1 answer
36 views

Explode nested JSON to Dataframe

There are loads of answers on this topic, but for the life of me I cannot a solution to my issue. Say I have a JSON like json_2_explode = [{'scalar': '43', 'units': 'm', 'parameter': [{'no_1': '45'...
user37292's user avatar
  • 424
-1 votes
0 answers
32 views

Getting different results from Groupby for different sized Dataframes

I'm running the same functions on these two dfs that are identical except that they have different lengths (same number of columns and data types). When I run the larger one I get exactly as I would ...
5sWithCrackScreen's user avatar
1 vote
1 answer
35 views

Python Unit Test Side Effect Returns Function Instead of Value

I am working through creating unit tests for a Python application that handles data via Pandas DataFrames. One section of this application formats data in various DataFrame columns. I am looking to ...
noahsrc's user avatar
  • 23
0 votes
3 answers
73 views

Remove duplicates based on criteria from one column while merging data from different column

My source dataframe: Name Source Description Value John A Text1 1 John B Longer text 4 Bob B Text2 2 Alice Z Longer text 5 Alice Y The Longest text 3 Alice X Text3 6 I want to drop duplicates from ...
Laura's user avatar
  • 95
0 votes
2 answers
57 views

How to select a range of data in a pandas dataframe

I have this pandas dataframe : df : import pandas as pd data = { "function": ["test1","test2","test3","test4","test5","test6",&...
user29295031's user avatar
-7 votes
0 answers
37 views

Convert SpreadSheet to Pdf [closed]

Here I want to convert spreadsheets to pdf If I am converting using pandas this error is coming 2025-04-30 11:37:53,533: WARNING/ForkPoolWorker-2] File "/virtualenvs/venv/lib/python3.11/site-...
Nandini Sirasani's user avatar
0 votes
0 answers
21 views

Performance difference during fetching between pandas-gbq and bigquery_storage api in python

I can fetch data from gbq using two methods: df = pd.io.gbq.read_gbq( query, project_id=project_id use_bqstorage_api=True, credentials=credentials, configuration=dict( ...
KJon's user avatar
  • 1
-4 votes
1 answer
51 views

How do I read a `.arrow` (Apache Arrow aka Feather V2 format) file with Python Pandas?

I'm trying to read an .arrow format file with Python pandas. pandas does not have a read_arrow function. However, it does have read_csv, read_parquet, and other similarly named functions. How can I ...
user2138149's user avatar
  • 17.9k
0 votes
2 answers
96 views

How to match a substring using a pattern and replace by passing a variable in RegEx, Python

I am trying to iterate through a Pandas dataframe's column values one by one to detect a substring with a RegEx pattern and replace it wherever it shows up. The string values in the dataframe's target ...
SimonsWorld's user avatar
0 votes
1 answer
81 views

How to compare every 2 rows(rows 1 and 2, rows 3 and 4, etc..) against eachother and output the results to a table

I am working on a project that requires me to compare 2 rows (1 and 2, 3 and 4, etc...) and output the differences to a table. Now I have been able to compare the columns and create the table with ...
Ajlec12's user avatar
  • 45
1 vote
1 answer
58 views

xlsxwriter not applying the border to the full dataset

I'm simply trying to create a nice border for my dataset. It applies it nicely to the entire dataset expect to the first row where the data actually starts. import pandas as pd import io # In-memory ...
user22083723's user avatar
1 vote
0 answers
38 views

How to convert from Python pandas Timestamp to repeated google.protobuf.Timestamp? (Python + Google Protocol Buffers)

I am trying to write some code which converts the contents of a pandas.DataFrame to a protobuf object which can be serialized and written to a file. Here is my protobuf definition. syntax = "...
user2138149's user avatar
  • 17.9k
0 votes
1 answer
20 views

Python 3 on windows ARM loading pandas

For Python 3 How can I install pandas on a windows 11 ARM machine without downloading and compiling the source? I get various errors, such as "could not find a version that satisfies the ...
Mark S's user avatar
  • 11
1 vote
2 answers
75 views

Efficiently calculate time to first 'purchase' event per user in Pandas DataFrame

How can I compute time to first target event per user using Pandas efficiently (with edge cases)? I'm analyzing user behavior using a Pandas DataFrame that logs events on an app. Each row includes a ...
Samuel Olayiwola's user avatar

15 30 50 per page
1
2 3 4 5
19282
X