Last active
July 2, 2018 00:18
-
-
Save Ankita-Das/bc84f1ceedb251126d1ee69935182747 to your computer and use it in GitHub Desktop.
read_into_colab_from_drive.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "read_into_colab_from_drive.ipynb", | |
"version": "0.3.2", | |
"provenance": [], | |
"collapsed_sections": [], | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"[View in Colaboratory](https://colab.research.google.com/gist/Ankita-Das/bc84f1ceedb251126d1ee69935182747/load.ipynb)" | |
] | |
}, | |
{ | |
"metadata": { | |
"id": "nzT4QlaYixgw", | |
"colab_type": "code", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"!pip install -U -q PyDrive ## you will have install for every colab session\n", | |
"\n", | |
"from pydrive.auth import GoogleAuth\n", | |
"from pydrive.drive import GoogleDrive\n", | |
"from google.colab import auth\n", | |
"from oauth2client.client import GoogleCredentials\n", | |
"\n", | |
"# 1. Authenticate and create the PyDrive client.\n", | |
"auth.authenticate_user()\n", | |
"gauth = GoogleAuth()\n", | |
"gauth.credentials = GoogleCredentials.get_application_default()\n", | |
"drive = GoogleDrive(gauth)\n", | |
"\n", | |
"#dataset=drive.CreateFile({'id':'1fLX0Fd5sKxKlXmYGpWxqOTaKOTwgGZtZ'})\n" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"id": "QyCWwGRUkK1O", | |
"colab_type": "code", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"#Right click on the file to be uploaded and go to 'Get shareable link ' from that link get the id\n", | |
"dataset=drive.CreateFile({'id':'1fLX0Fd5sKxKlXmYGpWxqOTaKOTwgGZtZ'})\n", | |
"dataset.GetContentFile('train_csv.csv')\n", | |
"#https://stackoverflow.com/questions/46986398/import-data-into-google-colaboratory" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"id": "f1tea-aKRzq0", | |
"colab_type": "code", | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 4098 | |
}, | |
"outputId": "5b571254-8399-4542-d9ad-5daf0348dd0d" | |
}, | |
"cell_type": "code", | |
"source": [ | |
"import pandas as pd\n", | |
"xyz = pd.read_csv('train_csv.csv') \n", | |
"print(xyz)\n" | |
], | |
"execution_count": 0, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
" Product_ID links \\\n", | |
"0 1 https://www.bakingo.com/sites/default/files/st... \n", | |
"1 2 https://www.bakingo.com/sites/default/files/st... \n", | |
"2 3 https://www.bakingo.com/sites/default/files/st... \n", | |
"3 4 https://www.bakingo.com/sites/default/files/st... \n", | |
"4 5 https://www.bakingo.com/sites/default/files/st... \n", | |
"5 6 https://www.bakingo.com/sites/default/files/st... \n", | |
"6 7 https://www.bakingo.com/sites/default/files/st... \n", | |
"7 8 https://www.bakingo.com/sites/default/files/st... \n", | |
"8 9 https://www.bakingo.com/sites/default/files/st... \n", | |
"9 10 https://www.bakingo.com/sites/default/files/st... \n", | |
"10 11 https://www.bakingo.com/sites/default/files/st... \n", | |
"11 12 https://www.bakingo.com/sites/default/files/st... \n", | |
"12 13 https://www.bakingo.com/sites/default/files/st... \n", | |
"13 14 https://www.bakingo.com/sites/default/files/st... \n", | |
"14 15 https://www.bakingo.com/sites/default/files/st... \n", | |
"15 16 https://www.bakingo.com/sites/default/files/st... \n", | |
"16 17 https://www.bakingo.com/sites/default/files/st... \n", | |
"17 18 https://www.bakingo.com/sites/default/files/st... \n", | |
"18 19 https://www.bakingo.com/sites/default/files/st... \n", | |
"19 20 https://www.bakingo.com/sites/default/files/st... \n", | |
"20 21 https://www.bakingo.com/sites/default/files/st... \n", | |
"21 22 https://www.bakingo.com/sites/default/files/st... \n", | |
"22 23 https://www.bakingo.com/sites/default/files/st... \n", | |
"23 24 https://www.bakingo.com/sites/default/files/st... \n", | |
"24 25 https://www.bakingo.com/sites/default/files/st... \n", | |
"25 26 https://www.bakingo.com/sites/default/files/st... \n", | |
"26 27 https://www.bakingo.com/sites/default/files/st... \n", | |
"27 28 https://www.bakingo.com/sites/default/files/st... \n", | |
"28 29 https://www.bakingo.com/sites/default/files/st... \n", | |
"29 30 https://www.bakingo.com/sites/default/files/st... \n", | |
"30 31 https://www.bakingo.com/sites/default/files/st... \n", | |
"31 32 https://www.bakingo.com/sites/default/files/st... \n", | |
"32 33 https://www.bakingo.com/sites/default/files/st... \n", | |
"33 34 https://www.bakingo.com/sites/default/files/st... \n", | |
"34 35 https://www.bakingo.com/sites/default/files/st... \n", | |
"35 36 https://www.bakingo.com/sites/default/files/st... \n", | |
"36 37 https://www.bakingo.com/sites/default/files/st... \n", | |
"37 38 https://www.bakingo.com/sites/default/files/st... \n", | |
"38 39 https://www.bakingo.com/sites/default/files/st... \n", | |
"39 40 https://www.bakingo.com/sites/default/files/st... \n", | |
"40 41 https://www.bakingo.com/sites/default/files/st... \n", | |
"41 42 https://www.bakingo.com/sites/default/files/st... \n", | |
"42 43 https://www.bakingo.com/sites/default/files/st... \n", | |
"43 44 https://www.bakingo.com/sites/default/files/st... \n", | |
"44 45 https://www.bakingo.com/sites/default/files/st... \n", | |
"45 46 https://www.bakingo.com/sites/default/files/st... \n", | |
"46 47 https://www.bakingo.com/sites/default/files/st... \n", | |
"47 48 https://www.bakingo.com/sites/default/files/st... \n", | |
"48 49 https://www.bakingo.com/sites/default/files/st... \n", | |
"49 50 https://www.bakingo.com/sites/default/files/st... \n", | |
"50 51 https://www.bakingo.com/sites/default/files/st... \n", | |
"51 52 https://www.bakingo.com/sites/default/files/st... \n", | |
"52 53 https://www.bakingo.com/sites/default/files/st... \n", | |
"53 54 https://www.bakingo.com/sites/default/files/st... \n", | |
"54 55 https://www.bakingo.com/sites/default/files/st... \n", | |
"55 56 https://www.bakingo.com/sites/default/files/st... \n", | |
"56 57 https://www.bakingo.com/sites/default/files/st... \n", | |
"\n", | |
" title short_title \\\n", | |
"0 Delectable Truffle Choco Truffle Cake \n", | |
"1 Cherry Pool Black Forest with Heart Cake \n", | |
"2 Queen Of Hearts Valentine's Truffle 3 Heart Cake \n", | |
"3 Love Happiness Vanilla Funfetti Cake \n", | |
"4 Snow Kissed Heart Shaped Fondant Vanilla Cake \n", | |
"5 Ebony And Ivory Choco Vanilla Cake \n", | |
"6 The Original B.F. Black Forest Cake \n", | |
"7 Imploding Beauty Red Velvet with Fondant Heart Cake \n", | |
"8 Heartilicious Love Black Forest Heart Gateau \n", | |
"9 We Heart It Valentine's Truffle 2 Heart Cake \n", | |
"10 Classic One Fondant Heart Truffle Cake \n", | |
"11 Velvetilicious Bliss Red Velvet with 3 Fondant Heart Cake \n", | |
"12 Hearty Sweetness Vanilla Fondant Cake \n", | |
"13 Eternal Berry Love Choco hearts Strawberry Cake \n", | |
"14 Cherry Bomb Black Forest Red Heart Cake \n", | |
"15 Tiramisu Cheese Cake Tiramisu Cheese Cake \n", | |
"16 Butterscotch Delight Butterscotch Cake \n", | |
"17 Fruit Frenzy Fresh Fruit Cake \n", | |
"18 Exotic Affair Heart Shaped Chocolate Cake \n", | |
"19 Pink Heaven Strawberry Rose Cake \n", | |
"20 Sunshine Poise Mango Cheese Cake \n", | |
"21 Luscious Chocoberry Choco Strawberry Cake \n", | |
"22 German Gateau German Black Forest Cake \n", | |
"23 Sun-kissed Joys Pineapple Upside Down Cake \n", | |
"24 Classique Pina Caramelo Hawaiian Pineapple Cake \n", | |
"25 Red Infatuation Red Velvet Cake \n", | |
"26 Eternal Sweetness Strawberry Sensation Cake \n", | |
"27 Irish Delight Irish Cream Cake \n", | |
"28 Fuse Fiesta Snicker Chocolate Cake \n", | |
"29 Caffe-Elixir Coffee Opera Cake \n", | |
"30 Choco-Scotch Sensation Chocolate Butterscotch Cake \n", | |
"31 Kit Kat \"Bake\" Kit Kat Cake \n", | |
"32 Twisted B.F.Tale Five Star Cake \n", | |
"33 Secret Confession Heart Shaped Vanilla Strawberry Cake \n", | |
"34 Choco Drizzle Chocolate Chip Cake \n", | |
"35 Kiwi-Licious Kiwi Fruit Cake \n", | |
"36 Cherry-Indulgence Royal Cherry Cake \n", | |
"37 Dark Magic Heart Shaped Choco Truffle Cake \n", | |
"38 Choco-Nutty-Licious Chocolate Nut Cake \n", | |
"39 Mango Magic Mango Cake \n", | |
"40 Choco-Thrill Chocolate Mud Cake \n", | |
"41 Amore Mio Heart Shaped Double Heart Choco Truffle Cake \n", | |
"42 Caffeine Blitz Coffee Cake \n", | |
"43 Oreoholic'S Delight Oreo Choco Cake \n", | |
"44 Magical Moments Red Velvet Choco Coffee Cake \n", | |
"45 Heart-licious Pleasure Heart Shaped Choco Vanilla Cake \n", | |
"46 Coffee Mocha Felicity Coffee Mocha Cake \n", | |
"47 Pineapple Classique Pineapple Cake \n", | |
"48 Exquisite Chocolate Gateau Chocolate Light Cake \n", | |
"49 Nutty Coffee Secret Coffee Walnut Cake \n", | |
"50 Kiwi Ecstasy Simple Kiwi Cake \n", | |
"51 Luxurious Fantasy Red Velvet Fruit Cake \n", | |
"52 Blue Berry Bonanza \"3B\" Blueberry Cake \n", | |
"53 Rocher-Aholic'S Fantasy Ferrero Rocher Cake \n", | |
"54 Torrid Affair Heart Shaped Black Forest Vanilla Cake \n", | |
"55 Strawberry Seduction Strawberry Cake \n", | |
"56 White Paradesia White Forest Cake \n", | |
"\n", | |
" price description \\\n", | |
"0 Rs. 475 The devilishly delicious taste of this cake wi... \n", | |
"1 Rs. 549 Delve into the sweetest symphony and experienc... \n", | |
"2 Rs. 549 Remember the taste? First the delicious coatin... \n", | |
"3 Rs. 499 You're gonna jump in joy in a single bite of t... \n", | |
"4 Rs. 1,500 We baked and created magic in every slice with... \n", | |
"5 Rs. 475 You are on the way to enter into the world of ... \n", | |
"6 Rs. 425 We kept this Classic simply unblemished, no tw... \n", | |
"7 Rs. 549 Can't wait to feed your sweet soul? Go ahead w... \n", | |
"8 Rs. 549 Baked in the flavors of love, drown yourself i... \n", | |
"9 Rs. 549 Because there's nothing wrong with going big a... \n", | |
"10 Rs. 549 Consider us your Valentine, every time you see... \n", | |
"11 Rs. 549 Keep up with the trending moreish cakes and fe... \n", | |
"12 Rs. 499 Bow down to the fairest of all blushing with a... \n", | |
"13 Rs. 549 With a decadent heartilicous cake like this, e... \n", | |
"14 Rs. 549 Bake their heart faster with lashings of cherr... \n", | |
"15 Rs. 1,450 When coffee, cheese and cream come together, a... \n", | |
"16 Rs. 425 Take a bite of this extra- delectable delicacy... \n", | |
"17 Rs. 600 Now all Fruit lovers and health conscious folk... \n", | |
"18 Rs. 950 Stay hooked to deliciousness of this heart-sha... \n", | |
"19 Rs. 550 A work of art brimming with finesse! This is a... \n", | |
"20 Rs. 1,450 Satiate your summertime desires with this deli... \n", | |
"21 Rs. 525 This craft of love made with luscious strawber... \n", | |
"22 Rs. 475 Say 'hello' to the Perfect mood lifters! Seduc... \n", | |
"23 Rs. 950 This mushy cake baked with pineapple & cherrie... \n", | |
"24 Rs. 500 Escape into the Hawaiian world of sweetness wi... \n", | |
"25 Rs. 550 Finished to perfection, we bet, this delicious... \n", | |
"26 Rs. 1,450 A tender cake so lusciously delicious that you... \n", | |
"27 Rs. 500 Time for some Irish Shots! Savour the scrumpti... \n", | |
"28 Rs. 600 The world is a better place because it has cho... \n", | |
"29 Rs. 550 Kick-start your day with divine coffee flavour... \n", | |
"30 Rs. 500 Bring some twist in the celebrations with indu... \n", | |
"31 Rs. 550 You'll fall in love at first bite! Deviate to ... \n", | |
"32 Rs. 550 A little twist to this Black Forest with 5-sta... \n", | |
"33 Rs. 950 As the \"Official Dessert of Romance\", this str... \n", | |
"34 Rs. 500 A rich, creamy overload of Chocolate with load... \n", | |
"35 Rs. 600 Slip into a slice and enter the world of exoti... \n", | |
"36 Rs. 650 We kept this Classic simply unblemished, no tw... \n", | |
"37 Rs. 950 Presenting something blissfully elegant, decad... \n", | |
"38 Rs. 600 Indulge into the Romantic Story of chocolate g... \n", | |
"39 Rs. 525 Why relish your favourite fruit just in summer... \n", | |
"40 Rs. 500 This Chocolate Mud Cake is rich, dense and oh-... \n", | |
"41 Rs. 950 Are You a Chocolate Addict? Yes! This striking... \n", | |
"42 Rs. 525 There is one more kind of love in this World -... \n", | |
"43 Rs. 525 Redefining taste of Original Oreo with a kick ... \n", | |
"44 Rs. 550 Once you take a slice, you will join the leagu... \n", | |
"45 Rs. 950 What happens when Chocolate & Vanilla come tog... \n", | |
"46 Rs. 550 Presenting the Choco mocha and coffee flavoure... \n", | |
"47 Rs. 400 The perfect example of simplicity at its best ... \n", | |
"48 Rs. 550 This scrumptious chocolate cake is for all the... \n", | |
"49 Rs. 600 An overwhelming blend of chocolate cake and es... \n", | |
"50 Rs. 525 Sweet Vanilla & Exotic Kiwi have come together... \n", | |
"51 Rs. 1,099 \"This Red Velvet Fruit cake with tender crumbs... \n", | |
"52 Rs. 500 Take a bite and dive into the divine flavour o... \n", | |
"53 Rs. 700 Who can resist the Magical spell of Ferrero Ro... \n", | |
"54 Rs. 950 The internet has a new obsession - Choco-Vanil... \n", | |
"55 Rs. 450 Take a bite of this Blushing Pink Love and ind... \n", | |
"56 Rs. 475 With Milk chocolate shavings and cream that lo... \n", | |
"\n", | |
" Date_Time \n", | |
"0 2018-02-09 22:43:15.264192 \n", | |
"1 2018-02-09 22:43:15.264219 \n", | |
"2 2018-02-09 22:43:15.264228 \n", | |
"3 2018-02-09 22:43:15.264235 \n", | |
"4 2018-02-09 22:43:15.264242 \n", | |
"5 2018-02-09 22:43:15.264249 \n", | |
"6 2018-02-09 22:43:15.264256 \n", | |
"7 2018-02-09 22:43:15.264263 \n", | |
"8 2018-02-09 22:43:15.264270 \n", | |
"9 2018-02-09 22:43:15.264277 \n", | |
"10 2018-02-09 22:43:15.264283 \n", | |
"11 2018-02-09 22:43:15.264290 \n", | |
"12 2018-02-09 22:43:15.264296 \n", | |
"13 2018-02-09 22:43:15.264303 \n", | |
"14 2018-02-09 22:43:15.264309 \n", | |
"15 2018-02-09 22:43:15.264316 \n", | |
"16 2018-02-09 22:43:15.264323 \n", | |
"17 2018-02-09 22:43:15.264330 \n", | |
"18 2018-02-09 22:43:15.264336 \n", | |
"19 2018-02-09 22:43:15.264343 \n", | |
"20 2018-02-09 22:43:15.264350 \n", | |
"21 2018-02-09 22:43:15.264357 \n", | |
"22 2018-02-09 22:43:15.264364 \n", | |
"23 2018-02-09 22:43:15.264371 \n", | |
"24 2018-02-09 22:43:15.264378 \n", | |
"25 2018-02-09 22:43:15.264384 \n", | |
"26 2018-02-09 22:43:15.264391 \n", | |
"27 2018-02-09 22:43:15.264398 \n", | |
"28 2018-02-09 22:43:15.264422 \n", | |
"29 2018-02-09 22:43:15.264434 \n", | |
"30 2018-02-09 22:43:15.264445 \n", | |
"31 2018-02-09 22:43:15.264455 \n", | |
"32 2018-02-09 22:43:15.264466 \n", | |
"33 2018-02-09 22:43:15.264481 \n", | |
"34 2018-02-09 22:43:15.264493 \n", | |
"35 2018-02-09 22:43:15.264503 \n", | |
"36 2018-02-09 22:43:15.264513 \n", | |
"37 2018-02-09 22:43:15.264543 \n", | |
"38 2018-02-09 22:43:15.264571 \n", | |
"39 2018-02-09 22:43:15.264581 \n", | |
"40 2018-02-09 22:43:15.264592 \n", | |
"41 2018-02-09 22:43:15.264602 \n", | |
"42 2018-02-09 22:43:15.264613 \n", | |
"43 2018-02-09 22:43:15.264640 \n", | |
"44 2018-02-09 22:43:15.264651 \n", | |
"45 2018-02-09 22:43:15.264661 \n", | |
"46 2018-02-09 22:43:15.264671 \n", | |
"47 2018-02-09 22:43:15.264681 \n", | |
"48 2018-02-09 22:43:15.264692 \n", | |
"49 2018-02-09 22:43:15.264702 \n", | |
"50 2018-02-09 22:43:15.264712 \n", | |
"51 2018-02-09 22:43:15.264722 \n", | |
"52 2018-02-09 22:43:15.264733 \n", | |
"53 2018-02-09 22:43:15.264743 \n", | |
"54 2018-02-09 22:43:15.264753 \n", | |
"55 2018-02-09 22:43:15.264764 \n", | |
"56 2018-02-09 22:43:15.264776 \n" | |
], | |
"name": "stdout" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment