{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "3b938485", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'C:\\\\Users\\\\Karishma\\\\anaconda3\\\\envs\\\\ickle\\\\python.exe'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import sys\n", "sys.executable" ] }, { "cell_type": "code", "execution_count": 2, "id": "b0df5039", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import ickle as ick" ] }, { "cell_type": "code", "execution_count": 3, "id": "6c0f7f1f", "metadata": {}, "outputs": [], "source": [ "name = np.array(['John', 'Sam', 'Tina'])\n", "place = np.array(['Kolkata', 'Mumbai', 'Delhi'])\n", "\n", "data = {'name': name, 'place': place}\n", "df = ick.DataFrame(data)" ] }, { "cell_type": "code", "execution_count": 4, "id": "fa2a5d2d", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(3, 2)" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.shape" ] }, { "cell_type": "code", "execution_count": 5, "id": "749c6fc7", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(df)" ] }, { "cell_type": "code", "execution_count": 6, "id": "a263f5c0", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['name', 'place']" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.columns" ] }, { "cell_type": "code", "execution_count": 7, "id": "e3b99e9b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([['John', 'Kolkata'],\n", " ['Sam', 'Mumbai'],\n", " ['Tina', 'Delhi']], dtype=object)" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.values" ] }, { "cell_type": "code", "execution_count": null, "id": "6f5c810e", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "4a486b1d", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.9.7" } }, "nbformat": 4, "nbformat_minor": 5 }