{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "provenance": [], "authorship_tag": "ABX9TyPw0MF3Gx8VcPFHJAT7+DFw", "include_colab_link": true }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" } }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "view-in-github", "colab_type": "text" }, "source": [ "" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "66LJ0DYvE0VT" }, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "source": [ "a = [2,4,3,\"fdfd\",[5,6]]" ], "metadata": { "id": "SiB9YNFCFM34" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "a" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "VN9HcJJxFM6P", "outputId": "4d043c99-5b03-4889-e477-fbc1a0c78273" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "[2, 4, 3, 'fdfd', [5, 6]]" ] }, "metadata": {}, "execution_count": 8 } ] }, { "cell_type": "code", "source": [ "a[4][0]" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "dpZJ7o6rFM8h", "outputId": "073a71f5-e916-41e3-c044-14dcacc86837" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "5" ] }, "metadata": {}, "execution_count": 9 } ] }, { "cell_type": "code", "source": [ "b={'alfa':1,\n", "'beta':27, \n", "'gamma':[0,1,2],\n", "'delta':67.3,\n", "'ninety-eight':{\n", " 'a': 5, \n", " 'b':7}\n", " }" ], "metadata": { "id": "SLpBGGrxFM_C" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "b['ninety-eight']['a']" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "dMWo74m8FNBO", "outputId": "5d5c8bf3-8f09-451d-b715-74471d0e0dc8" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "5" ] }, "metadata": {}, "execution_count": 11 } ] }, { "cell_type": "code", "source": [ "b.keys(),b.values()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "b3kDuRkvFNDw", "outputId": "ed754cdd-af27-43be-b662-a6d0280aefdc" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "(dict_keys(['alfa', 'beta', 'gamma', 'delta', 'ninety-eight']),\n", " dict_values([1, 27, [0, 1, 2], 67.3, {'a': 5, 'b': 7}]))" ] }, "metadata": {}, "execution_count": 12 } ] }, { "cell_type": "code", "source": [ "df = pd.read_csv('lowhightrellis.csv')" ], "metadata": { "id": "0QNJ_pl1E9TK" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "df" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 423 }, "id": "wAi_z58QE9Y8", "outputId": "a6fcf87c-5e97-43ec-9b9b-31aeaebf667b" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Entity Year Annual CO2 emissions Billion Tonnes\n", "0 High-income countries 2000 13.814314\n", "1 High-income countries 2001 13.768310\n", "2 High-income countries 2002 13.879006\n", "3 High-income countries 2003 14.132029\n", "4 High-income countries 2004 14.346497\n", ".. ... ... ...\n", "83 Upper-middle-income countries 2017 15.586029\n", "84 Upper-middle-income countries 2018 15.964710\n", "85 Upper-middle-income countries 2019 16.338437\n", "86 Upper-middle-income countries 2020 16.219840\n", "87 Upper-middle-income countries 2021 17.038822\n", "\n", "[88 rows x 3 columns]" ], "text/html": [ "\n", "
\n", " | Entity | \n", "Year | \n", "Annual CO2 emissions Billion Tonnes | \n", "
---|---|---|---|
0 | \n", "High-income countries | \n", "2000 | \n", "13.814314 | \n", "
1 | \n", "High-income countries | \n", "2001 | \n", "13.768310 | \n", "
2 | \n", "High-income countries | \n", "2002 | \n", "13.879006 | \n", "
3 | \n", "High-income countries | \n", "2003 | \n", "14.132029 | \n", "
4 | \n", "High-income countries | \n", "2004 | \n", "14.346497 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "
83 | \n", "Upper-middle-income countries | \n", "2017 | \n", "15.586029 | \n", "
84 | \n", "Upper-middle-income countries | \n", "2018 | \n", "15.964710 | \n", "
85 | \n", "Upper-middle-income countries | \n", "2019 | \n", "16.338437 | \n", "
86 | \n", "Upper-middle-income countries | \n", "2020 | \n", "16.219840 | \n", "
87 | \n", "Upper-middle-income countries | \n", "2021 | \n", "17.038822 | \n", "
88 rows × 3 columns
\n", "\n", " | 0 | \n", "1 | \n", "2 | \n", "3 | \n", "4 | \n", "5 | \n", "6 | \n", "7 | \n", "8 | \n", "9 | \n", "... | \n", "78 | \n", "79 | \n", "80 | \n", "81 | \n", "82 | \n", "83 | \n", "84 | \n", "85 | \n", "86 | \n", "87 | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Entity | \n", "High-income countries | \n", "High-income countries | \n", "High-income countries | \n", "High-income countries | \n", "High-income countries | \n", "High-income countries | \n", "High-income countries | \n", "High-income countries | \n", "High-income countries | \n", "High-income countries | \n", "... | \n", "Upper-middle-income countries | \n", "Upper-middle-income countries | \n", "Upper-middle-income countries | \n", "Upper-middle-income countries | \n", "Upper-middle-income countries | \n", "Upper-middle-income countries | \n", "Upper-middle-income countries | \n", "Upper-middle-income countries | \n", "Upper-middle-income countries | \n", "Upper-middle-income countries | \n", "
Year | \n", "2000 | \n", "2001 | \n", "2002 | \n", "2003 | \n", "2004 | \n", "2005 | \n", "2006 | \n", "2007 | \n", "2008 | \n", "2009 | \n", "... | \n", "2012 | \n", "2013 | \n", "2014 | \n", "2015 | \n", "2016 | \n", "2017 | \n", "2018 | \n", "2019 | \n", "2020 | \n", "2021 | \n", "
Annual CO2 emissions Billion Tonnes | \n", "13.814314 | \n", "13.76831 | \n", "13.879006 | \n", "14.132029 | \n", "14.346497 | \n", "14.392103 | \n", "14.391346 | \n", "14.503344 | \n", "14.207814 | \n", "13.361896 | \n", "... | \n", "15.168901 | \n", "15.347986 | \n", "15.518297 | \n", "15.348731 | \n", "15.287409 | \n", "15.586029 | \n", "15.96471 | \n", "16.338437 | \n", "16.21984 | \n", "17.038822 | \n", "
3 rows × 88 columns
\n", "