All Questions
16,899 questions
2
votes
0
answers
112
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 ...
-1
votes
1
answer
28
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 requirement ...
-1
votes
1
answer
59
views
Clone data with new table in oracle using pandas
I am trying to clone SCOTT.EMP table with TEST table. However datatypes are not matching.
Please advise how to create a clone of EMP with new Table "TEST" with Same datatype in python pandas....
3
votes
1
answer
55
views
How can I sort order of index based on my preference in multi-index pandas dataframes
I have a pandas dataframe df. It has multi-index with Gx.Region and Scenario_Model.
The Scenario_Model index is ordered in alphabetical order des, pes, tes. When I plot it, it comes in the same order. ...
1
vote
1
answer
63
views
Build aggregated network graph from Pandas dataframe containing a column with list of nodes for each row?
I'm dipping my toes into network visualizations in Python. I have a dataframe like the following:
| user | nodes |
| -----| ---------|
| A | [0, 1, 3]|
| B | [1, 2, 4]|
| C | [0, 3] |
|.....
0
votes
1
answer
73
views
Nondeterministic behaviour of openpyxl
I have a Python script, that basically looks like this:
import mypackage
# this function generates always the same pandas.DataFrame
df = mypackage.create_the_dataframe()
# write the DataFrame to ...
1
vote
2
answers
70
views
how to read a file and reformat some columns into new rows
I have data * in the following format in a text file.
x1 y1 z1 x2 y2 z2 x3 y3 z3 data1x data1y data1z data2x data2y data2z data3x data3y data3z
I'm trying to reformat the file such the output looks ...
0
votes
1
answer
54
views
Matplotlib Plotting repeating steps in x axis
I have a dataframe like the following:
ID Parm_1 Parm_2 Result
0 100 100 0.2
1 100 200 0.4
3 100 300 0.9
4 100 400 0.45
5 ...
3
votes
2
answers
128
views
Why is this python code not running faster with parallelization?
This is a MWE of some code I'm writing to do some monte carlo exercises. I need to estimate models across draws and I'm parallelizing across models. In the MWE a "model" is just parametrized ...
1
vote
1
answer
35
views
Reading AWS S3 CSV file in Python with Backslash "\" in column data(as last Character)
I have a CSV file in AWS S3 bucket, which is having below sample data.
First_name
job_level
Andrew \
SSE
Kyle
SE
while loading csv file to pandas, this is giving me error as the
End of record reached ...
-1
votes
2
answers
81
views
Copying certain cells of an excel file to fix the report in Python
In the below table how can we copy the column tempx cells for each test from partition column long cell to the corresponding test cell
For example when we filter Scenario Column cell A1.results.0....
1
vote
1
answer
68
views
Choose rows from pandas dataframe based on a condition for many columns
I have a pandas DataFrame df that has very many columns, including some named "S-xx" with xx ranging from 1 to 20. All these 20 columns contain labels; let's say they're A,B,C and N. What I ...
0
votes
0
answers
46
views
Convert Struct to Map in Python for Writing to S3 in Parquet Format
I am using Apache Airflow to backfill historical data from BigQuery to S3 in Parquet format. The existing data in S3 is written by an Apache Flink job and follows a specific schema.
I have transformed ...
0
votes
0
answers
20
views
Pandas dataframe info() vs info [duplicate]
Any ideas what the difference between pandas.DataFrame.info and pandas.DataFrame.info() cause each one seems to work and yield different output.
Using the example available on pandas.DataFrame.info ...
-1
votes
1
answer
105
views
Pandas ValueError when using on_bad_lines
Question: What I may be doing wrong and how we can fix the following error?
import pandas as pd
def handle_bad_line(bad_line: list[str]) -> list[str] | None:
# Do something with the bad line, ...