formula

Make two conditions and it returns a column with its result in Pandas

Make two conditions and it returns a column with its result in Pandas Question: I need to create a new column that meets the following conditions. in pandas this is my current dataframe Ruote B C D E R1 115 1 150 -35 R2 155 1 150 5 R3 155 6 150 5 New column …

Total answers: 1

Taking the coordinates of an object and creating a formula to drag an arrow

Taking the coordinates of an object and creating a formula to drag an arrow Question: I am using OpenCV to triangulate the position of an object, and am trying to create some kind of formula to pass the coordinates that I obtain through to drag a pull arrow, casting a fishing rod. I tried using …

Total answers: 1

How to proceed with calculations on dataframe

How to proceed with calculations on dataframe Question: I dont know how to proceed with a calculation on this database. Database example: Indicator Market Sales Costs Volume Real Internal 30512 -16577 12469 Real External 23 -15 8 Real Other 65 -38 25 … … … … … … … … … … … … Budget …

Total answers: 1

Python – Openpyxl – Add formula to column and repeat formula to last row of data

Python – Openpyxl – Add formula to column and repeat formula to last row of data Question: Trying to do the following: In column G add the following formula: "=ACOS(COS(RADIANS(90-D2)) *COS(RADIANS(90-D3)) +SIN(RADIANS(90-D2)) *SIN(RADIANS(90-D3)) *COS(RADIANS(E2-E3))) *6371" Repeat this formula in column G up to the last row with data in columns D and E. I want …

Total answers: 2

Dynamically evaluate an expression from a formula in Pandas

Dynamically evaluate an expression from a formula in Pandas Question: I would like to perform arithmetic on one or more dataframes columns using pd.eval. Specifically, I would like to port the following code that evaluates a formula: x = 5 df2[‘D’] = df1[‘A’] + (df1[‘B’] * x) …to code using pd.eval. The reason for using …

Total answers: 2

Get formula from Excel cell with python xlrd

Get formula from Excel cell with python xlrd Question: I have to port an algorithm from an Excel sheet to python code but I have to reverse engineer the algorithm from the Excel file. The Excel sheet is quite complicated, it contains many cells in which there are formulas that refer to other cells (that …

Total answers: 6