Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Carga en Python de datos en formato csv usando Pandas "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "(768, 9)\n",
- " Pregnancies Glucose BloodPressure SkinThickness Insulin BMI \\\n",
- "0 6 148 72 35 0 33.6 \n",
- "1 1 85 66 29 0 26.6 \n",
- "2 8 183 64 0 0 23.3 \n",
- "3 1 89 66 23 94 28.1 \n",
- "4 0 137 40 35 168 43.1 \n",
- "5 5 116 74 0 0 25.6 \n",
- "6 3 78 50 32 88 31.0 \n",
- "7 10 115 0 0 0 35.3 \n",
- "8 2 197 70 45 543 30.5 \n",
- "9 8 125 96 0 0 0.0 \n",
- "\n",
- " DiabetesPedigreeFunction Age Outcome \n",
- "0 0.627 50 1 \n",
- "1 0.351 31 0 \n",
- "2 0.672 32 1 \n",
- "3 0.167 21 0 \n",
- "4 2.288 33 1 \n",
- "5 0.201 30 0 \n",
- "6 0.248 26 1 \n",
- "7 0.134 29 0 \n",
- "8 0.158 53 1 \n",
- "9 0.232 54 1 \n"
- ]
- }
- ],
- "source": [
- "import pandas\n",
- "filename = 'diabetes.csv'\n",
- "data = pandas.read_csv(filename, header=0)\n",
- "\n",
- "print(data.shape)\n",
- "print (data.head(10))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": true
- },
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.6.3"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement