Question: Does this function work to load in a csv file? import pandas as pd def load _ data ( filename ) :
Does this function work to load in a csv file?
import pandas as pd
def loaddatafilename:
Get the data from the given csv file.
Returns: positions, spots, volatilities, rates
df pdreadcsvpfscurrencydata.csv #load data from csv file
positions dfpositionsvalues #extracting data from columns
spots dfspot exchange rate'values
vols dfmonth volatility annualizedvalues
rates dfmonth interest rate annualizedvalues
return positions, spots, volatilities, rates
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
