You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This dataset contains loan information, including loan ID, customer gender, location, region, total price for each loan etc.
# Instructions
# Begin by importing the necessary libraries, numpy.
# Use the open() function to open csv file and assign the result to a variable.
# Use the numpy array to perform some basic statistical analysis on the data, such as finding the mean, median, and standard deviation of the loan amounts.
# Note:
# Be sure to close the file after you have finished reading it in with the open() function.
# Use the delimiter parameter in the genfromtxt() function to specify that the values in the file are separated by commas.
# You can use the numpy functions mean(), median(), and std() to find the mean, median, and standard deviation of the loan amounts.
# -----> SOLUTION
importnumpyasnp
importpandasaspd
# METHOD 1 - Using Numpy genfromtxt()
data="C:/Users/lEO/Desktop/Dataset/ML data/2/P14-Part2-Regression/Section 6 - Simple Linear Regression/Python/Salary_Data.csv"