How to use 'pd.read_csv file path' in Python

Every line of 'pd.read_csv file path' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
34def readData(path):
35 """
36 使用pandas读取数据
37 """
38 data = pd.read_csv(path)
39 cols = ["age", "education_num", "capital_gain", "capital_loss", "hours_per_week", "label"]
40 return data[cols]

Related snippets