from get_project_path import project_path
+
+# Load the data from the CSV file
+def load_data(filename):
+ file_path = project_path + "/data/" + filename
+ data = pd.read_csv(file_path)
+ return data
§§ --- src/get_project_path.py
§§ 1000
+import os # to get the project path
+project_path = os.getcwd()[:-3] # remove "src" from path string
创作工场
免责声明:
以上内容除特别注明外均来源于网友提问,创作工场回答,未经许可,严谨转载。
点击这里>>使用🔥专业版,更聪明、更完整、更原创!