Apr-26-2020, 04:14 PM
You're trying to insert the file-name in the function definition.
This is wrong.
The name my_file points to the object, which is the first argument of the call.
Everything which is in this block, is inside the function.
Calling a function, requires the name, the parenthesis and the arguments.
Some function don't require arguments, but in your case you need two arguments.
Old file, new file.
This is wrong.
def do_something(my_file): print(my_file)
my_file
is a name, which is accessible inside the function.The name my_file points to the object, which is the first argument of the call.
do_something("a_file.csv") # ^^^^^^^^^^^^ # First Argument, my_nameYou have to call:
get_data("AAPL.csv", "AAPL_filtered.csv")No
def
in front of the function call.def
stands for definition of function followed by the name and in the parenthesis the arguments and keyword arguments.Everything which is in this block, is inside the function.
Calling a function, requires the name, the parenthesis and the arguments.
Some function don't require arguments, but in your case you need two arguments.
Old file, new file.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!