Commit a589ce33 authored by Thomas Torsney-Weir's avatar Thomas Torsney-Weir

use pandas to load data

parent 9e4250e0
......@@ -16,17 +16,16 @@
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"from matplotlib import pyplot as plt\n",
"import numpy as np\n",
"#import pandas as pd\n",
"import pandas as pd\n",
"# you can also use pandas to load the data\n",
"data = np.loadtxt('happiness.csv', skiprows=1, delimiter=',', converters = {3: lambda s: float(s[1])})\n",
"data = pd.read_csv('happiness.csv')"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment