Skip to main content

All Questions

0 votes
0 answers
13 views

Creating multiple dataframe in faster way with function? [duplicate]

I need to create multiple dataframe (let say 30 dataframe) in faster way rather manually create one-by-one dataframe. anyone has answer or reference links? Thank you in advance def dvd(y): df = ...
stvlam22's user avatar
  • 147
1 vote
1 answer
45 views

iteration calculation based on another dataframe

How to do iteration calculation as shown in df2 as desired output ? any reference links for this > many thanks for helping df1 a b c 0 1 0 5 1 9 9 2 2 2 2 8 3 6 3 0 4 6 1 7 df2 ...
stvlam22's user avatar
  • 147
-1 votes
1 answer
31 views

Changing values with conditional and function in pandas/python

I have a dataframe, as per the table below A. I want to create a table with the values ​​of table B. I would like to compare the next value in the row with the previous value in table A. If the next ...
gveronese's user avatar
-2 votes
1 answer
107 views

iteration using it.chain

I'm stuck on returning the result from the function which is checking samples for A/B test and gave the result. The calculation is correct, but somehow I'm getting the result twice. The code and ...
Karina Doll's user avatar
0 votes
1 answer
126 views

How do I create a Python function that creates values based on previous row's values?

I have a Pandas dataframe with 3 columns: Date, Return, and Result that has stock gains % in the Return column. The dates are set to daily and the index is reset. The dataframe has hundreds of rows. I'...
j_zeta1122's user avatar
-1 votes
1 answer
164 views

Conditional Iteration over a Pandas Dataframe using Function

every month I get a dataframe , so every month I will have to do some adjusts to the dataframe, I would like to create a function for just apply it on every dataframe without create the code again. I ...
Aleja Gallo's user avatar
0 votes
1 answer
202 views

Comparing quarterly data: Iteration in Python(Pandas) to compare multiple columns from four different excel files imported as dataframe

Dear Stackoverflow community, I have an excel file "big_excel.xlsx", which comprises of four columns namely "date_column","efficacy", "composition" and "...
Acerace.py's user avatar
1 vote
1 answer
128 views

Multiple operations iterating over dataframe columns (apply function?)

I have a pandas dataframe with thousands of columns and I would like to perform the following operations for each column of the dataframe: check if the value i-th and i-1-th values are in the range (...
AK88's user avatar
  • 3,026
-1 votes
1 answer
98 views

Making Recomendation Landmark List : How to iterate over Dataframe and perforn a function?

I have trouble with my project to make a recommendation list for landmarks. So I have a database like a graph below and I iterate function over. What I don't understand is how to perform an iteration ...
lakiah23mh's user avatar
0 votes
1 answer
101 views

How do I iterate through combinations of two lists and perform a function each time?

Doing an Alphavantage API pull for historic stock data. I'm pulling one of their indicators. Instead of writing 36 separate functions and manually pulling, I'd like to iterate through the 36 possible ...
Shaun Barbour's user avatar
2 votes
1 answer
4k views

How to iterate over pandas rows containing lists of string to check whether each word is in english or not?

I have a pandas dataframe which contains review texts. After text preprocessing I ended up with list of strings in each row. Now I want to iterate over each row of these lists of strings to check ...
Raffi Sahakyan's user avatar
0 votes
2 answers
1k views

Iterate over every row in pandas dataframe and multiply all row values by one of the row values in same dataframe

I am trying to normalize row values in a dataframe. The values that need to be normalized contain the text, 'Count' in their column header. There are other columns that do not have the word 'Count' in ...
DataScope's user avatar
0 votes
2 answers
38 views

Use each value in a list to filter for subsets? [duplicate]

I have a large data set that I need to create several subsets for. I want to take each string value in the list to filter a column on the larger data set and save as a subset. So for each value in the ...
SoSincere3's user avatar
0 votes
2 answers
37 views

Value from iterative function in pandas

I have a dataframe and would like to have the values in one column being set through an iterative function as below. import pandas as pd import numpy as np d = {'col1': [0.4444, 25.4615], 'col2'...
Marcus Högenå Bohman's user avatar
3 votes
1 answer
109 views

Referencing a list from list of lists

I have a 2 dataframes One- Score Card for scoring student marks Second One-Student dataset. I want to apply score card on a given student dataset to compute score and aggregate them. I'm trying to ...
pmv's user avatar
  • 357

15 30 50 per page