How to define data series in Python [closed] - python-3.x

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 months ago.
Improve this question
I am a python newb having only learnt in last 3 month.
I have a .csv file with +1000columns of data.
Each row is related to a specific data series with each column a row.
I am struggling to define each data series within my code - and then column series as well - though I feel this will be easier?
This is my most complex code I have written so I am both very excited whilst doing it but running into problems with my understanding.

I suggest you start with loading your csv with pandas using
import pandas as pd
pd.read_csv('filename.csv')

Related

Excel VBA-XLOOKUP [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 13 days ago.
This post was edited and submitted for review 7 days ago.
Improve this question
Unfortunately, I couldn't find the right thread, so I'm trying here.
I'm trying to write a function with XLOOKUP that accesses the Database table. I can do that with the formula. But my problem is that I also have individual headings/titles for the individual cells of the XLOOKUP. I would like to transpose both rows with multiple columns. Unfortunately, this does not work so easily with MTRANS. Therefore, I am trying to solve the transposition with VBA (reluctantly).
I have not been able to find a reasonable solution. Example structure looks like the datatype "test.xlms":
Now, row 1&2 have to transponse. How can i do that? And how can i translate a XLOOKUP-function with 5 arguments in a VBA-script? Can anybody explain it?
enter image description here
enter image description here

Pandas DataFrame to percent function [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 months ago.
Improve this question
Is there any nice build in function in pandas which can convert values in DataFrame to percent (by rows, by columns or any more complex combination with use of levels)?
Im not sure that is what you mean, but if you want to know the percentage value within the columns you can do it like this:
for col in df:
df[col] = (df[col]/df[col].sum()) * 100

How to generate pdf report from python code plot and result dataframe [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Given a Pandas.DataFrame with numeric data, I'm looking for way to output the following directly into a pdf file:
The Pandas.DataFrame itself as a table
The plot of the Pandas.DataFrame
A few lines of text
A title
Add a logo on left top side of a page
All these should happen automatically at the end of the sctipt execution.
The Pandas.DataFrame is the following:
df_out = pd.DataFrame({'A':[1,3,4,7,8,11,1,15,20,15,16,87],
'B':[1,3,4,6,8,11,1,19,20,15,16,87],
'flag':[0,0,0,0,1,1,1,0,0,1,0,0]})
plt.plot(df_out['B'].values)
write text1:
this plot is good
write text 2: This table is write
Thanks in advance for any sugestions.

Copy selection of numbers in a particular order into Excel [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
In one part of my spreadsheet, I am calculating odds ratios. I have one column (V) with the OR, and then W and X with the confidence intervals. In another column (M), I am trying to get excel to list this information in one cell.
i.e.
0.78 (0.25, 2.46)
I have just been copying the information, but this is prone to errors and takes ages, so I am looking for a better way.
Any ideas?
Try a formula like:
=[#columnV]&"("&[#columnW]&","&[#columnX]&")"
This should concatenate row wise down the entire table with the desired format.

Average multiple scores of the same topic [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
Say I have a spreadsheet that contains quizzes taken by students and their scores.
I want to create another table of that data the gives me an average of 2 quizzes that are related to the same topic. I have attached an example. Not all topics contain two different quizzes, some just consist of one single quiz.
Maybe someone could help me solve this.
enter image description here
I tried to use a pivot table but it creates a column for each test, not exactly what I need.
I would use AverageIFS() like this:
=AVERAGEIFS($C:$C,$B:$B,F$1,$A:$A,$E2)
As per the screenshot below. Hope this helps!!!

Resources