Skip to content
Advertisement

Tag: function

Apply function to all columns of data frame python

I have two dfs AVERAGE_CALL_DURATION AVERAGE_DURATION CHANGE_OF_DETAILS 267 298 0 0 421 609.33 0.33 330 334 0 0 240.5 666.5 0 628 713 0 0 and AVERAGE_CALL_DURATION AVERAGE_DURATION CHANGE_OF_DETAILS -5.93 -4.95 0.90 593.50 595.70 1.00 I want to return 1 if the xx column contains the range within NoC_c (where column names are the same I can do this for

Is this a correct python port of a fortran function call

I’m trying to port fortran code to python (call me crazy), and am wondering whether I’m handling the input of a variable to a function in a correct way. note that I’ve read: Fortran77: what does the asterisk (*) means in subroutine argument? How can a scalar be passed to a vector (1D array) to a Fortran subroutine? What is

Python local variable to global variable

I’m trying to write a modular script, with functions -Function 1 age = input(“tell me your age : “) -Function 2 weight = input(“tell me your weight : “) -Function 3 birthday = input(“tell me your birthday : “) at the end, i want to send a mail outside functions like : mail_body = age + weight + birthday Thanks

Python program that tells you whether or not you need an umbrella when you leave the house [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 8 months ago. Improve this question The program should: Ask you if it is raining using input() If the input is ‘y’, it should output ‘Take

Advertisement