From 4f6f807e3c7fd957d77f2bde00365ddc91ee154a Mon Sep 17 00:00:00 2001 From: Aniruddh Date: Wed, 2 Jul 2025 17:36:35 -0700 Subject: [PATCH] PANDAS1 DONE --- .DS_Store | Bin 0 -> 6148 bytes big_countries.ipynb | 21 +++++++++++++++++++++ customersneverorder.ipynb | 21 +++++++++++++++++++++ dataframe.ipynb | 26 ++++++++++++++++++++++++++ recylable lowfat.ipynb | 21 +++++++++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 .DS_Store create mode 100644 big_countries.ipynb create mode 100644 customersneverorder.ipynb create mode 100644 dataframe.ipynb create mode 100644 recylable lowfat.ipynb diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c1b723920ca26501e899f2791aec30be7cfc506f GIT binary patch literal 6148 zcmeHK!A=4(5Pd~VBwjdr(QKk84 zEBckX`)@Pdm~5=cp@}hI3>X7D8Q`5Qa&YL;dSk#CFa}l($oC;)6O04a9`)0~PM-k8 zCe13;w22YgZh literal 0 HcmV?d00001 diff --git a/big_countries.ipynb b/big_countries.ipynb new file mode 100644 index 0000000..b8fec01 --- /dev/null +++ b/big_countries.ipynb @@ -0,0 +1,21 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "c3df2908", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "\n", + "# Assume 'world' DataFrame is already defined\n", + "big_countries = world[(world['area'] >= 300000) | (world['population'] >= 25000000)][['name', 'population', 'area']]\n", + "big_countries\n" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/customersneverorder.ipynb b/customersneverorder.ipynb new file mode 100644 index 0000000..5b5e0b7 --- /dev/null +++ b/customersneverorder.ipynb @@ -0,0 +1,21 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "f81924e7", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "\n", + "# Assume 'Customers' and 'Orders' DataFrames are already defined\n", + "result = Customers[~Customers['id'].isin(Orders['customerId'])][['name']]\n", + "result\n" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/dataframe.ipynb b/dataframe.ipynb new file mode 100644 index 0000000..6d8ad3d --- /dev/null +++ b/dataframe.ipynb @@ -0,0 +1,26 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "baede9fb", + "metadata": {}, + "outputs": [], + "source": [ + "# import pandas as pd \n", + "import pandas as pd \n", + "\n", + "# List1 \n", + "lst = [['Geek', 25], ['is', 30], \n", + " ['for', 26], ['Geeksforgeeks', 22]] \n", + "\n", + "# creating df object with columns specified \n", + "df = pd.DataFrame(lst, columns =['Tag', 'number']) \n", + "print(df )" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/recylable lowfat.ipynb b/recylable lowfat.ipynb new file mode 100644 index 0000000..28a7a45 --- /dev/null +++ b/recylable lowfat.ipynb @@ -0,0 +1,21 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "1a96a26c", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "\n", + "# Assume 'products' DataFrame is already defined\n", + "result = products[(products['low_fats'] == 'Y') & (products['recyclable'] == 'Y')]\n", + "result\n" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +}