Sorry, you do not have a permission to ask a question, You must login to ask question.

• 5

## Get max value from a list with lists?

• 5

So I have a list that contains several list which all have three strings first, then one float number, like: resultlist = [["1", "1", "a", 8.3931], ["1", "2", "b", 6.3231], ["2", "1", "c", 9.1931]] How do I make a ...

• 9

## How to pass a list as an input of a function in Python

• 9

I am using Python, and I have a function which takes a list as the argument. For example, I am using the following syntax, def square(x,result= []): for y in x: ...

• 1

## Run function exactly once for each row in a Pandas dataframe

• 1

If I have a function def do_irreversible_thing(a, b): print a, b And a dataframe, say df = pd.DataFrame([(0, 1), (2, 3), (4, 5)], columns=['a', 'b']) What’s the best way to run the function exactly once for each row in ...

• 1

## IndexError: index 1 is out of bounds for axis 0 with size 1/ForwardEuler

• 1

I am numerically solving for x(t) for a system of first order differential equations. The system is: dy/dt=(C)\*[(-K\*x)+M*A] I have implemented the Forward Euler method to solve this problem as follows: Here is my code: import matplotlib import numpy as np from numpy ...

• 2

## Adding a column in pandas df using a function

• 2

I have a Pandas df [see below]. How do I add values from a function to a new column “price”? function: def getquotetoday(symbol): yahoo = Share(symbol) ...

• 7

## Python function that identifies if the numbers in a list or array are closer to 0 or 1

• 7

I have a numpy array of numbers. Below is an example: [[-2.10044520e-04 1.72314372e-04 1.77235336e-04 -1.06613465e-04 6.76617611e-07 2.71623057e-03 -3.32789944e-05 1.44899758e-05 5.79249863e-05 4.06502549e-04 -1.35823707e-05 -4.13955189e-04 5.29862793e-05 -1.98286005e-04 -2.22829175e-04 -8.88758230e-04 5.62228710e-05 1.36249752e-05 -2.00474996e-05 -2.10090068e-05 1.00007518e+00 1.00007569e+00 -4.44597417e-05 -2.93724453e-04 1.00007513e+00 1.00007496e+00 ...

• 4

## Function parameter with colon

• 4

I just came across this function: def splitComma(line: str): splits = Utils.COMMA_DELIMITER.split(line) return "{}, {}".format(splits, splits) I ame aware that you can separate parameters by , or can set a value within a parameter ...

• 8

## How to have multiple conditions for one if statement in python

• 8

So I am writing some code in python 3.1.5 that requires there be more than one condition for something to happen. Example: def example(arg1, arg2, arg3): if arg1 == 1: ...

• 2

## Translate function in Python 3

• 2

I am using Python 3 and I want to translate my file names to have no numbers. The translate function doesn’t seem to work in Python 3. How can I translate the file names to have no numbers? ...

• 8

## How to apply a function on every row on a dataframe?

• 8

I am new to Python and I am not sure how to solve the following problem. I have a function: def EOQ(D,p,ck,ch): Q = math.sqrt((2*D*ck)/(ch*p)) return Q Say I have the dataframe df = pd.DataFrame({"D": [10,20,30], ...