1
0
mirror of https://github.com/gsi-upm/sitc synced 2024-11-22 06:22:29 +00:00

Changed cif2cif 2 gsi-upm

This commit is contained in:
J. Fernando Sánchez 2016-03-29 11:21:43 +02:00
parent 3165eac23c
commit f56dc93804
4 changed files with 11 additions and 11 deletions

View File

@ -1443,7 +1443,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": 4,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2584,7 +2584,7 @@
"[891 rows x 12 columns]" "[891 rows x 12 columns]"
] ]
}, },
"execution_count": 7, "execution_count": 4,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2592,7 +2592,7 @@
"source": [ "source": [
"import pandas as pd\n", "import pandas as pd\n",
"#We get a URL with raw content (not HTML one)\n", "#We get a URL with raw content (not HTML one)\n",
"url = \"https://raw.githubusercontent.com/cif2cif/sitc/master/ml2/data-titanic/train.csv\"\n", "url = \"https://raw.githubusercontent.com/gsi-upm/sitc/master/ml2/data-titanic/train.csv\"\n",
"df = pd.read_csv(url)\n", "df = pd.read_csv(url)\n",
"df" "df"
] ]
@ -2606,7 +2606,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 5,
"metadata": { "metadata": {
"collapsed": false, "collapsed": false,
"scrolled": false "scrolled": false
@ -2618,7 +2618,7 @@
"b'PassengerId,Survived,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked\\r\\n1,0,3,\"Braund, Mr. Owen Harris\",male,22,1,0,A/5 21171,7.25,,S\\r\\n2,1,1,\"Cumings, Mrs. John Bradley (Florence Briggs Thayer)\",female,38,1,0,PC 17599,71.2833,C85,C\\r\\n3,1,3,\"Heikkinen, Miss. Laina\",female,26,0,0,STON/O2. 3101282,7.925,,S\\r\\n4,1,1,'" "b'PassengerId,Survived,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked\\r\\n1,0,3,\"Braund, Mr. Owen Harris\",male,22,1,0,A/5 21171,7.25,,S\\r\\n2,1,1,\"Cumings, Mrs. John Bradley (Florence Briggs Thayer)\",female,38,1,0,PC 17599,71.2833,C85,C\\r\\n3,1,3,\"Heikkinen, Miss. Laina\",female,26,0,0,STON/O2. 3101282,7.925,,S\\r\\n4,1,1,'"
] ]
}, },
"execution_count": 8, "execution_count": 5,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2628,7 +2628,7 @@
"import pandas as pd\n", "import pandas as pd\n",
"import io\n", "import io\n",
"import requests\n", "import requests\n",
"url = \"https://raw.githubusercontent.com/cif2cif/sitc/master/ml2/data-titanic/train.csv\"\n", "url = \"https://raw.githubusercontent.com/gsi-upm/sitc/master/ml2/data-titanic/train.csv\"\n",
"s = requests.get(url, stream=True).content\n", "s = requests.get(url, stream=True).content\n",
"#Print the first 320 characters for understanding how it works\n", "#Print the first 320 characters for understanding how it works\n",
"s[:320]" "s[:320]"
@ -2636,7 +2636,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": 6,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -3777,7 +3777,7 @@
"[891 rows x 12 columns]" "[891 rows x 12 columns]"
] ]
}, },
"execution_count": 10, "execution_count": 6,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }

View File

@ -270,7 +270,7 @@
], ],
"source": [ "source": [
"#We get a URL with raw content (not HTML one)\n", "#We get a URL with raw content (not HTML one)\n",
"url=\"https://raw.githubusercontent.com/cif2cif/sitc/master/ml2/data-titanic/train.csv\"\n", "url=\"https://raw.githubusercontent.com/gsi-upm/sitc/master/ml2/data-titanic/train.csv\"\n",
"df = pd.read_csv(url)\n", "df = pd.read_csv(url)\n",
"df_original = df.copy() # Copy to have a version of df without modifications\n", "df_original = df.copy() # Copy to have a version of df without modifications\n",
"df.head()" "df.head()"

View File

@ -74,7 +74,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Assign the variable *df* a Dataframe with the Titanic Dataset from the URL https://raw.githubusercontent.com/cif2cif/sitc/master/ml2/data-titanic/train.csv\"\n", "Assign the variable *df* a Dataframe with the Titanic Dataset from the URL https://raw.githubusercontent.com/gsi-upm/sitc/master/ml2/data-titanic/train.csv\"\n",
"\n", "\n",
"Print *df*." "Print *df*."
] ]

View File

@ -203,7 +203,7 @@
], ],
"source": [ "source": [
"#We get a URL with raw content (not HTML one)\n", "#We get a URL with raw content (not HTML one)\n",
"url=\"https://raw.githubusercontent.com/cif2cif/sitc/master/ml2/data-titanic/train.csv\"\n", "url=\"https://raw.githubusercontent.com/gsi-upm/sitc/master/ml2/data-titanic/train.csv\"\n",
"df = pd.read_csv(url)\n", "df = pd.read_csv(url)\n",
"df.head()\n", "df.head()\n",
"\n", "\n",