...
 
Commits (2)
......@@ -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",
"\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",
"\n"
"data = pd.read_csv('happiness.csv')"
]
},
{
......
......@@ -6,7 +6,7 @@ import l1p1
def is_sorted(l):
if(len(l) < 2):
return True
return True
else:
return all([x<=y for x,y in zip(l[:-1],l[1:])])
......