Hello, I am trying to write a function that takes in a DataFrame that has an index, df[x:x2,c], and uses those index numbers for calculations.
An example would taking df[1:100,1] and then multiplying 1 and 100 by 2.
Whenever I try to create a function with df[x:x2,c] as a variable it throws this error, βdf[x:x2, c]β is not a valid function argument name."
I was wondering if my way of naming the variable is wrong, or I just have to write a function with a variable that encompasses the whole index and then index the index within the function (which I cant figure out either).
I would recommend you read the Julia docs or some beginner level tutorials to get a sense for how Julia works - your issues mainly seem to stem from a lack of understanding of base Julia syntax.
I would recommend you read the Julia docs or some beginner level tutorials to get a sense for how Julia works - your issues mainly seem to stem from a lack of understanding of base Julia syntax.
My lack of understanding is exactly why I am looking for help. I was unsure if there was a way to pass a DataFrame with and index as an argument. I tried looking for documentation online on the subject but I came up short.