From 921ed12abc12e578ab28c89050db7ce2cb29cab3 Mon Sep 17 00:00:00 2001 From: harsh2084 Date: Tue, 9 Apr 2024 23:44:31 +0530 Subject: [PATCH] updated --- DAY1/Copy_of_scratchpad.ipynb | 436 ++++++++++++++++++++++++++++++++++ README.md | 1 - 2 files changed, 436 insertions(+), 1 deletion(-) create mode 100644 DAY1/Copy_of_scratchpad.ipynb delete mode 100644 README.md diff --git a/DAY1/Copy_of_scratchpad.ipynb b/DAY1/Copy_of_scratchpad.ipynb new file mode 100644 index 0000000..5358428 --- /dev/null +++ b/DAY1/Copy_of_scratchpad.ipynb @@ -0,0 +1,436 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "lIYdn1woOS1n" + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "07bR3t1DWTHX" + }, + "outputs": [], + "source": [ + "## 1. Creating a DataFrame.\n", + "data = {'name': ['Jay', 'Ron', 'joe', 'Ross'],\n", + " 'age': ['5', '10', '7', '6'],\n", + " 'score': [9.4, 8.9, 7.2, 9]} \n", + "\n", + "df = pd.DataFrame(data)\n", + "\n", + "## Parameters ##\n", + "## Data : ndarray (structured or homogeneous), Iterable, dict, or DataFrame\n", + "## index: The index (row labels) of the DataFrame.\n", + "## columns: The column labels of the DataFrame.\n", + "## dtype\n", + "## copy" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 175 + }, + "id": "yQILKOfoWVV3", + "outputId": "d855f90d-2191-4713-a471-546d93c26722" + }, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "
\n", + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
nameagescore
0Jay59.4
1Ron108.9
2joe77.2
3Ross69.0
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ], + "text/plain": [ + " name age score\n", + "0 Jay 5 9.4\n", + "1 Ron 10 8.9\n", + "2 joe 7 7.2\n", + "3 Ross 6 9.0" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "L-x398-vWepE" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "4CY_q-coWfSV", + "outputId": "bcb8cc61-b1a9-4958-87f8-effd99314bde" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mounted at /content/drive\n" + ] + } + ], + "source": [ + "from google.colab import drive\n", + "drive.mount('/content/drive')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "P0ixFTEvWxE6" + }, + "outputs": [], + "source": [ + "df.to_csv(\"fileX.csv\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ooSMfWR9XMJY" + }, + "outputs": [], + "source": [ + "df=pd.read_csv(\"fileX.csv\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 175 + }, + "id": "1O-EuPraXfF7", + "outputId": "04d130fd-0b01-4865-bcb5-90d2be1e526a" + }, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "
\n", + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Unnamed: 0nameagescore
00Jay59.4
11Ron108.9
22joe77.2
33Ross69.0
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ], + "text/plain": [ + " Unnamed: 0 name age score\n", + "0 0 Jay 5 9.4\n", + "1 1 Ron 10 8.9\n", + "2 2 joe 7 7.2\n", + "3 3 Ross 6 9.0" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/README.md b/README.md deleted file mode 100644 index 85643e5..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# 14_days_challenge \ No newline at end of file