forked from paulosalvatore/Ocean_PythonPandas_10_08_20
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PythonPandas_CSV
1 lines (1 loc) · 95.5 KB
/
PythonPandas_CSV
1
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"PythonPandas_CSV","provenance":[],"collapsed_sections":[],"authorship_tag":"ABX9TyOCiSTdI5WYreBHMBDwxvAd"},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"code","metadata":{"id":"7sTESYYFpQ9r","colab_type":"code","colab":{},"executionInfo":{"status":"ok","timestamp":1597084390171,"user_tz":180,"elapsed":608,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}}},"source":["import pandas as pd"],"execution_count":1,"outputs":[]},{"cell_type":"code","metadata":{"id":"e_jet3EerAAj","colab_type":"code","colab":{},"executionInfo":{"status":"ok","timestamp":1597084828363,"user_tz":180,"elapsed":1497,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}}},"source":["dt = pd.read_csv('https://raw.githubusercontent.com/paulosalvatore/Ocean_PythonPandas_10_08_20/master/dados-curso.csv')"],"execution_count":2,"outputs":[]},{"cell_type":"code","metadata":{"id":"ycInrW0FrJzO","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597084839668,"user_tz":180,"elapsed":1072,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"b9b595e9-4c0e-4aae-98ce-e1bc4397bb49"},"source":["dt"],"execution_count":3,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>2020-05-23 00:21:14</td>\n"," <td>Para voltar tudo ao normal, você precisa fazer...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio das Ostras</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.937900</td>\n"," <td>-22.522600</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2020-03-22 22:57:51</td>\n"," <td>14.245 – O que é a hidroxicloroquina? https://...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.674739</td>\n"," <td>-23.606067</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>2020-04-14 00:11:33</td>\n"," <td>Quarta morte em Lar de Estarreja associada à C...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>2020-05-25 20:45:43</td>\n"," <td>COVID-19 | Hospital municipal Tide Setúbal, n...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>2020-04-15 10:34:39</td>\n"," <td>#cenasdocotidiano #santos #distanciamentosocia...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Santos</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.293700</td>\n"," <td>-23.975947</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>495</th>\n"," <td>2020-04-07 16:14:13</td>\n"," <td>O isolamento social também serve para mostrar ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Rio Branco</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-67.859657</td>\n"," <td>-9.932246</td>\n"," </tr>\n"," <tr>\n"," <th>496</th>\n"," <td>2020-03-26 18:02:28</td>\n"," <td>Enquanto o mundo está atento ao covid 19 é o B...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.358100</td>\n"," <td>-22.942800</td>\n"," </tr>\n"," <tr>\n"," <th>497</th>\n"," <td>2020-03-18 05:28:16</td>\n"," <td>#covid_19 #stayhome @ Toronto, Ontario https:/...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Toronto</td>\n"," <td>Canada</td>\n"," <td>CA</td>\n"," <td>-79.387200</td>\n"," <td>43.648000</td>\n"," </tr>\n"," <tr>\n"," <th>498</th>\n"," <td>2020-03-03 21:27:11</td>\n"," <td>Um vira-lata sem Coronavirus #joeviralata #dog...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>499</th>\n"," <td>2020-01-21 13:18:03</td>\n"," <td>Portugal já está a preparar-se para responder ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>500 rows × 9 columns</p>\n","</div>"],"text/plain":[" data ... longitude\n","0 2020-05-23 00:21:14 ... -22.522600\n","1 2020-03-22 22:57:51 ... -23.606067\n","2 2020-04-14 00:11:33 ... 38.747518\n","3 2020-05-25 20:45:43 ... -23.550000\n","4 2020-04-15 10:34:39 ... -23.975947\n",".. ... ... ...\n","495 2020-04-07 16:14:13 ... -9.932246\n","496 2020-03-26 18:02:28 ... -22.942800\n","497 2020-03-18 05:28:16 ... 43.648000\n","498 2020-03-03 21:27:11 ... -23.550000\n","499 2020-01-21 13:18:03 ... 38.747518\n","\n","[500 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":3}]},{"cell_type":"code","metadata":{"id":"hcfpAMHCrcms","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":70},"executionInfo":{"status":"ok","timestamp":1597085577662,"user_tz":180,"elapsed":903,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"69b68ad2-746f-4bb2-bad3-3e177d598b08"},"source":["print(dt.shape)\n","\n","print(type(dt.shape))\n","\n","print(dt.shape[0])"],"execution_count":7,"outputs":[{"output_type":"stream","text":["(500, 9)\n","<class 'tuple'>\n","500\n"],"name":"stdout"}]},{"cell_type":"code","metadata":{"id":"qtR9FRbat-3D","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":639},"executionInfo":{"status":"ok","timestamp":1597085599794,"user_tz":180,"elapsed":927,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"23a3abb8-f15b-488b-a7b8-1ac3d161baaf"},"source":["dt.head(20)"],"execution_count":9,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>2020-05-23 00:21:14</td>\n"," <td>Para voltar tudo ao normal, você precisa fazer...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio das Ostras</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.937900</td>\n"," <td>-22.522600</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2020-03-22 22:57:51</td>\n"," <td>14.245 – O que é a hidroxicloroquina? https://...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.674739</td>\n"," <td>-23.606067</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>2020-04-14 00:11:33</td>\n"," <td>Quarta morte em Lar de Estarreja associada à C...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>2020-05-25 20:45:43</td>\n"," <td>COVID-19 | Hospital municipal Tide Setúbal, n...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>2020-04-15 10:34:39</td>\n"," <td>#cenasdocotidiano #santos #distanciamentosocia...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Santos</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.293700</td>\n"," <td>-23.975947</td>\n"," </tr>\n"," <tr>\n"," <th>5</th>\n"," <td>2020-03-27 22:59:12</td>\n"," <td>O Papa Francisco rezando sozinho na imensa pra...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Vatican City</td>\n"," <td>Vatican City</td>\n"," <td>VA</td>\n"," <td>12.457018</td>\n"," <td>41.902473</td>\n"," </tr>\n"," <tr>\n"," <th>6</th>\n"," <td>2020-05-25 10:39:40</td>\n"," <td>Estudo randomizado com remdesivir para o trata...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Kingston</td>\n"," <td>Canada</td>\n"," <td>CA</td>\n"," <td>-76.482852</td>\n"," <td>44.232424</td>\n"," </tr>\n"," <tr>\n"," <th>7</th>\n"," <td>2020-03-22 19:12:37</td>\n"," <td>Memórias do cárcere. Hoje deu até pra treinar ...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.273900</td>\n"," <td>-22.961900</td>\n"," </tr>\n"," <tr>\n"," <th>8</th>\n"," <td>2020-04-17 10:37:04</td>\n"," <td>Bélgica ultrapassa barreira das 5.000 mortes p...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>9</th>\n"," <td>2020-04-14 11:57:33</td>\n"," <td>Covid-19 | Ninguém paga água no concelho - Até...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Montalegre</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-7.791839</td>\n"," <td>41.823221</td>\n"," </tr>\n"," <tr>\n"," <th>10</th>\n"," <td>2020-03-26 20:57:34</td>\n"," <td>Mais de 23 mil mortes e 505 mil infeções em to...</td>\n"," <td>2</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>11</th>\n"," <td>2020-02-14 02:25:32</td>\n"," <td>Em toda a China, as pessoas estão falando sobr...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Curitiba</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-49.269900</td>\n"," <td>-25.434600</td>\n"," </tr>\n"," <tr>\n"," <th>12</th>\n"," <td>2020-03-22 14:51:40</td>\n"," <td>O isolamento social recomendado pelas autorida...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Natal</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-35.209500</td>\n"," <td>-5.800800</td>\n"," </tr>\n"," <tr>\n"," <th>13</th>\n"," <td>2020-04-05 15:56:52</td>\n"," <td>💁♀️🤩 #Lookdodia... aliás, do Fim de semana ha...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Natal</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-35.209500</td>\n"," <td>-5.800800</td>\n"," </tr>\n"," <tr>\n"," <th>14</th>\n"," <td>2020-05-27 20:05:18</td>\n"," <td>Atenção, foco e concentração no desenvolviment...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Cachoeiro de Itapemirim</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.109000</td>\n"," <td>-20.847800</td>\n"," </tr>\n"," <tr>\n"," <th>15</th>\n"," <td>2020-03-31 12:14:37</td>\n"," <td>Em tempos de isolamento social, vamos de traba...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Natal</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-35.206731</td>\n"," <td>-5.868995</td>\n"," </tr>\n"," <tr>\n"," <th>16</th>\n"," <td>2020-05-18 23:45:11</td>\n"," <td>E aí vamos testar uma live amanhã, fazer conte...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Aragarças</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-52.260080</td>\n"," <td>-15.892750</td>\n"," </tr>\n"," <tr>\n"," <th>17</th>\n"," <td>2020-03-18 02:46:27</td>\n"," <td>A Prefeitura Municipal de Caraúbas vem, por me...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Upanema</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-37.303100</td>\n"," <td>-5.530000</td>\n"," </tr>\n"," <tr>\n"," <th>18</th>\n"," <td>2020-03-19 18:45:05</td>\n"," <td>Quarta morte por Covid-19 em Portugal. Primeir...</td>\n"," <td>4</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>19</th>\n"," <td>2020-05-22 16:58:23</td>\n"," <td>Estudo multicêntrico no lancet com 96k pacient...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Ponta Grossa</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-50.165100</td>\n"," <td>-25.090600</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" data ... longitude\n","0 2020-05-23 00:21:14 ... -22.522600\n","1 2020-03-22 22:57:51 ... -23.606067\n","2 2020-04-14 00:11:33 ... 38.747518\n","3 2020-05-25 20:45:43 ... -23.550000\n","4 2020-04-15 10:34:39 ... -23.975947\n","5 2020-03-27 22:59:12 ... 41.902473\n","6 2020-05-25 10:39:40 ... 44.232424\n","7 2020-03-22 19:12:37 ... -22.961900\n","8 2020-04-17 10:37:04 ... 38.747518\n","9 2020-04-14 11:57:33 ... 41.823221\n","10 2020-03-26 20:57:34 ... 38.747518\n","11 2020-02-14 02:25:32 ... -25.434600\n","12 2020-03-22 14:51:40 ... -5.800800\n","13 2020-04-05 15:56:52 ... -5.800800\n","14 2020-05-27 20:05:18 ... -20.847800\n","15 2020-03-31 12:14:37 ... -5.868995\n","16 2020-05-18 23:45:11 ... -15.892750\n","17 2020-03-18 02:46:27 ... -5.530000\n","18 2020-03-19 18:45:05 ... 38.747518\n","19 2020-05-22 16:58:23 ... -25.090600\n","\n","[20 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":9}]},{"cell_type":"code","metadata":{"id":"PHu6rd7EuI3y","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":228},"executionInfo":{"status":"ok","timestamp":1597085659356,"user_tz":180,"elapsed":706,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"5cd897c9-4898-44ff-84a5-5f8c11f8383b"},"source":["dt.lugar"],"execution_count":12,"outputs":[{"output_type":"execute_result","data":{"text/plain":["0 Rio das Ostras\n","1 Sao Paulo\n","2 Lisbon\n","3 Sao Paulo\n","4 Santos\n"," ... \n","495 Rio Branco\n","496 Rio de Janeiro\n","497 Toronto\n","498 Sao Paulo\n","499 Lisbon\n","Name: lugar, Length: 500, dtype: object"]},"metadata":{"tags":[]},"execution_count":12}]},{"cell_type":"code","metadata":{"id":"h0QYn7K-ucmv","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":70},"executionInfo":{"status":"ok","timestamp":1597085930193,"user_tz":180,"elapsed":801,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"250128f2-83c5-442f-e990-e73e16a4f75e"},"source":["print(dt.lugar[4])\n","print(type(dt.lugar[4]))\n","\n","print(type(dt.lugar))"],"execution_count":26,"outputs":[{"output_type":"stream","text":["Santos\n","<class 'str'>\n","<class 'pandas.core.series.Series'>\n"],"name":"stdout"}]},{"cell_type":"code","metadata":{"id":"fTd-G_mVwdmF","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597086230329,"user_tz":180,"elapsed":940,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"928d410e-58ff-494c-8d09-d3415392b122"},"source":["dt"],"execution_count":41,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>2020-05-23 00:21:14</td>\n"," <td>Para voltar tudo ao normal, você precisa fazer...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio das Ostras</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.937900</td>\n"," <td>-22.522600</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2020-03-22 22:57:51</td>\n"," <td>14.245 – O que é a hidroxicloroquina? https://...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.674739</td>\n"," <td>-23.606067</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>2020-04-14 00:11:33</td>\n"," <td>Quarta morte em Lar de Estarreja associada à C...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>2020-05-25 20:45:43</td>\n"," <td>COVID-19 | Hospital municipal Tide Setúbal, n...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>2020-04-15 10:34:39</td>\n"," <td>#cenasdocotidiano #santos #distanciamentosocia...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Santos</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.293700</td>\n"," <td>-23.975947</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>495</th>\n"," <td>2020-04-07 16:14:13</td>\n"," <td>O isolamento social também serve para mostrar ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Rio Branco</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-67.859657</td>\n"," <td>-9.932246</td>\n"," </tr>\n"," <tr>\n"," <th>496</th>\n"," <td>2020-03-26 18:02:28</td>\n"," <td>Enquanto o mundo está atento ao covid 19 é o B...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.358100</td>\n"," <td>-22.942800</td>\n"," </tr>\n"," <tr>\n"," <th>497</th>\n"," <td>2020-03-18 05:28:16</td>\n"," <td>#covid_19 #stayhome @ Toronto, Ontario https:/...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Toronto</td>\n"," <td>Canada</td>\n"," <td>CA</td>\n"," <td>-79.387200</td>\n"," <td>43.648000</td>\n"," </tr>\n"," <tr>\n"," <th>498</th>\n"," <td>2020-03-03 21:27:11</td>\n"," <td>Um vira-lata sem Coronavirus #joeviralata #dog...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>499</th>\n"," <td>2020-01-21 13:18:03</td>\n"," <td>Portugal já está a preparar-se para responder ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>500 rows × 9 columns</p>\n","</div>"],"text/plain":[" data ... longitude\n","0 2020-05-23 00:21:14 ... -22.522600\n","1 2020-03-22 22:57:51 ... -23.606067\n","2 2020-04-14 00:11:33 ... 38.747518\n","3 2020-05-25 20:45:43 ... -23.550000\n","4 2020-04-15 10:34:39 ... -23.975947\n",".. ... ... ...\n","495 2020-04-07 16:14:13 ... -9.932246\n","496 2020-03-26 18:02:28 ... -22.942800\n","497 2020-03-18 05:28:16 ... 43.648000\n","498 2020-03-03 21:27:11 ... -23.550000\n","499 2020-01-21 13:18:03 ... 38.747518\n","\n","[500 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":41}]},{"cell_type":"code","metadata":{"id":"gz2XF633wfYP","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":228},"executionInfo":{"status":"ok","timestamp":1597086315875,"user_tz":180,"elapsed":838,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"08b7abf5-1916-4123-a3b3-67571f517bae"},"source":["# Acessar a linha (Series) inteira do DataFrame, utilizando o iloc (IndexLocator)\n","\n","print(dt.iloc[0])\n","\n","print(type(dt.iloc[0]))\n","\n","print(dt.iloc[0].latitude)"],"execution_count":47,"outputs":[{"output_type":"stream","text":["data 2020-05-23 00:21:14\n","texto Para voltar tudo ao normal, você precisa fazer...\n","retweet 0\n","idioma pt\n","lugar Rio das Ostras\n","pais Brazil\n","sigla BR\n","latitude -41.9379\n","longitude -22.5226\n","Name: 0, dtype: object\n","<class 'pandas.core.series.Series'>\n","-41.9379\n"],"name":"stdout"}]},{"cell_type":"code","metadata":{"id":"M6q9NYULw667","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":136},"executionInfo":{"status":"ok","timestamp":1597086491310,"user_tz":180,"elapsed":820,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"f44807b7-ad08-4616-f4cf-9791ee706dea"},"source":["# Das 14h às 17h\n","# 14:17\n","dt.iloc[14:17]"],"execution_count":53,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>14</th>\n"," <td>2020-05-27 20:05:18</td>\n"," <td>Atenção, foco e concentração no desenvolviment...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Cachoeiro de Itapemirim</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.109000</td>\n"," <td>-20.847800</td>\n"," </tr>\n"," <tr>\n"," <th>15</th>\n"," <td>2020-03-31 12:14:37</td>\n"," <td>Em tempos de isolamento social, vamos de traba...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Natal</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-35.206731</td>\n"," <td>-5.868995</td>\n"," </tr>\n"," <tr>\n"," <th>16</th>\n"," <td>2020-05-18 23:45:11</td>\n"," <td>E aí vamos testar uma live amanhã, fazer conte...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Aragarças</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-52.260080</td>\n"," <td>-15.892750</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" data ... longitude\n","14 2020-05-27 20:05:18 ... -20.847800\n","15 2020-03-31 12:14:37 ... -5.868995\n","16 2020-05-18 23:45:11 ... -15.892750\n","\n","[3 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":53}]},{"cell_type":"code","metadata":{"id":"TezhId4exjKG","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597086558386,"user_tz":180,"elapsed":1522,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"5f4c0b0d-f468-4f53-e36e-2ca7e730e798"},"source":["# Das 14h em diante\n","# 14:\n","\n","dt.iloc[14:]"],"execution_count":54,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>14</th>\n"," <td>2020-05-27 20:05:18</td>\n"," <td>Atenção, foco e concentração no desenvolviment...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Cachoeiro de Itapemirim</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.109000</td>\n"," <td>-20.847800</td>\n"," </tr>\n"," <tr>\n"," <th>15</th>\n"," <td>2020-03-31 12:14:37</td>\n"," <td>Em tempos de isolamento social, vamos de traba...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Natal</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-35.206731</td>\n"," <td>-5.868995</td>\n"," </tr>\n"," <tr>\n"," <th>16</th>\n"," <td>2020-05-18 23:45:11</td>\n"," <td>E aí vamos testar uma live amanhã, fazer conte...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Aragarças</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-52.260080</td>\n"," <td>-15.892750</td>\n"," </tr>\n"," <tr>\n"," <th>17</th>\n"," <td>2020-03-18 02:46:27</td>\n"," <td>A Prefeitura Municipal de Caraúbas vem, por me...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Upanema</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-37.303100</td>\n"," <td>-5.530000</td>\n"," </tr>\n"," <tr>\n"," <th>18</th>\n"," <td>2020-03-19 18:45:05</td>\n"," <td>Quarta morte por Covid-19 em Portugal. Primeir...</td>\n"," <td>4</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>495</th>\n"," <td>2020-04-07 16:14:13</td>\n"," <td>O isolamento social também serve para mostrar ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Rio Branco</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-67.859657</td>\n"," <td>-9.932246</td>\n"," </tr>\n"," <tr>\n"," <th>496</th>\n"," <td>2020-03-26 18:02:28</td>\n"," <td>Enquanto o mundo está atento ao covid 19 é o B...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.358100</td>\n"," <td>-22.942800</td>\n"," </tr>\n"," <tr>\n"," <th>497</th>\n"," <td>2020-03-18 05:28:16</td>\n"," <td>#covid_19 #stayhome @ Toronto, Ontario https:/...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Toronto</td>\n"," <td>Canada</td>\n"," <td>CA</td>\n"," <td>-79.387200</td>\n"," <td>43.648000</td>\n"," </tr>\n"," <tr>\n"," <th>498</th>\n"," <td>2020-03-03 21:27:11</td>\n"," <td>Um vira-lata sem Coronavirus #joeviralata #dog...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>499</th>\n"," <td>2020-01-21 13:18:03</td>\n"," <td>Portugal já está a preparar-se para responder ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>486 rows × 9 columns</p>\n","</div>"],"text/plain":[" data ... longitude\n","14 2020-05-27 20:05:18 ... -20.847800\n","15 2020-03-31 12:14:37 ... -5.868995\n","16 2020-05-18 23:45:11 ... -15.892750\n","17 2020-03-18 02:46:27 ... -5.530000\n","18 2020-03-19 18:45:05 ... 38.747518\n",".. ... ... ...\n","495 2020-04-07 16:14:13 ... -9.932246\n","496 2020-03-26 18:02:28 ... -22.942800\n","497 2020-03-18 05:28:16 ... 43.648000\n","498 2020-03-03 21:27:11 ... -23.550000\n","499 2020-01-21 13:18:03 ... 38.747518\n","\n","[486 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":54}]},{"cell_type":"code","metadata":{"id":"xh6pZTHXxyGz","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597086592697,"user_tz":180,"elapsed":822,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"351e6905-046a-40fc-fff6-3e3b45e3a3ef"},"source":["# O dia todo\n","# :\n","\n","dt.iloc[:]"],"execution_count":55,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>2020-05-23 00:21:14</td>\n"," <td>Para voltar tudo ao normal, você precisa fazer...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio das Ostras</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.937900</td>\n"," <td>-22.522600</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2020-03-22 22:57:51</td>\n"," <td>14.245 – O que é a hidroxicloroquina? https://...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.674739</td>\n"," <td>-23.606067</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>2020-04-14 00:11:33</td>\n"," <td>Quarta morte em Lar de Estarreja associada à C...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>2020-05-25 20:45:43</td>\n"," <td>COVID-19 | Hospital municipal Tide Setúbal, n...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>2020-04-15 10:34:39</td>\n"," <td>#cenasdocotidiano #santos #distanciamentosocia...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Santos</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.293700</td>\n"," <td>-23.975947</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>495</th>\n"," <td>2020-04-07 16:14:13</td>\n"," <td>O isolamento social também serve para mostrar ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Rio Branco</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-67.859657</td>\n"," <td>-9.932246</td>\n"," </tr>\n"," <tr>\n"," <th>496</th>\n"," <td>2020-03-26 18:02:28</td>\n"," <td>Enquanto o mundo está atento ao covid 19 é o B...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.358100</td>\n"," <td>-22.942800</td>\n"," </tr>\n"," <tr>\n"," <th>497</th>\n"," <td>2020-03-18 05:28:16</td>\n"," <td>#covid_19 #stayhome @ Toronto, Ontario https:/...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Toronto</td>\n"," <td>Canada</td>\n"," <td>CA</td>\n"," <td>-79.387200</td>\n"," <td>43.648000</td>\n"," </tr>\n"," <tr>\n"," <th>498</th>\n"," <td>2020-03-03 21:27:11</td>\n"," <td>Um vira-lata sem Coronavirus #joeviralata #dog...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>499</th>\n"," <td>2020-01-21 13:18:03</td>\n"," <td>Portugal já está a preparar-se para responder ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>500 rows × 9 columns</p>\n","</div>"],"text/plain":[" data ... longitude\n","0 2020-05-23 00:21:14 ... -22.522600\n","1 2020-03-22 22:57:51 ... -23.606067\n","2 2020-04-14 00:11:33 ... 38.747518\n","3 2020-05-25 20:45:43 ... -23.550000\n","4 2020-04-15 10:34:39 ... -23.975947\n",".. ... ... ...\n","495 2020-04-07 16:14:13 ... -9.932246\n","496 2020-03-26 18:02:28 ... -22.942800\n","497 2020-03-18 05:28:16 ... 43.648000\n","498 2020-03-03 21:27:11 ... -23.550000\n","499 2020-01-21 13:18:03 ... 38.747518\n","\n","[500 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":55}]},{"cell_type":"code","metadata":{"id":"oNnnTBscx8g4","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":87},"executionInfo":{"status":"ok","timestamp":1597086636962,"user_tz":180,"elapsed":1497,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"8812b92b-b28d-4215-8097-bb297997f8d9"},"source":["dt.lugar[14:17]"],"execution_count":59,"outputs":[{"output_type":"execute_result","data":{"text/plain":["14 Cachoeiro de Itapemirim\n","15 Natal\n","16 Aragarças\n","Name: lugar, dtype: object"]},"metadata":{"tags":[]},"execution_count":59}]},{"cell_type":"code","metadata":{"id":"uFi1DPeXyCtb","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"executionInfo":{"status":"ok","timestamp":1597086660003,"user_tz":180,"elapsed":871,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"ccff944c-b20a-4d1f-9913-b3e34acd5177"},"source":["lista = [1, 20, 57, 94, 2, 3, 4, 5, 8]\n","\n","lista[2:4]"],"execution_count":60,"outputs":[{"output_type":"execute_result","data":{"text/plain":["[57, 94]"]},"metadata":{"tags":[]},"execution_count":60}]},{"cell_type":"code","metadata":{"id":"ZefV4LI-yP-z","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":77},"executionInfo":{"status":"ok","timestamp":1597086712854,"user_tz":180,"elapsed":1126,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"86480afe-059c-40c6-927e-88e789da1fd8"},"source":["dt.iloc[14:15]"],"execution_count":63,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>14</th>\n"," <td>2020-05-27 20:05:18</td>\n"," <td>Atenção, foco e concentração no desenvolviment...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Cachoeiro de Itapemirim</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.109</td>\n"," <td>-20.8478</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" data ... longitude\n","14 2020-05-27 20:05:18 ... -20.8478\n","\n","[1 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":63}]},{"cell_type":"code","metadata":{"id":"TBLZYZI1yXTi","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"executionInfo":{"status":"ok","timestamp":1597086729243,"user_tz":180,"elapsed":870,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"e4fabe4e-a4e2-4a2b-c8e6-ad9926ef1798"},"source":["type(dt.iloc[14:15])"],"execution_count":64,"outputs":[{"output_type":"execute_result","data":{"text/plain":["pandas.core.frame.DataFrame"]},"metadata":{"tags":[]},"execution_count":64}]},{"cell_type":"code","metadata":{"id":"e2QEAxnEyZwj","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"executionInfo":{"status":"ok","timestamp":1597086742874,"user_tz":180,"elapsed":1154,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"bb66cd20-c6bf-46cd-ff1c-da72b89be6f7"},"source":["type(dt.iloc[14])"],"execution_count":65,"outputs":[{"output_type":"execute_result","data":{"text/plain":["pandas.core.series.Series"]},"metadata":{"tags":[]},"execution_count":65}]},{"cell_type":"code","metadata":{"id":"hU2y3yxHylxW","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":343},"executionInfo":{"status":"ok","timestamp":1597086964103,"user_tz":180,"elapsed":1165,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"b3e9ed8d-2b4f-443d-893c-b015c5b2a216"},"source":["dt.tail(10)"],"execution_count":80,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>490</th>\n"," <td>2020-04-16 19:29:12</td>\n"," <td>Alguém disse coxinha?! #ChelseaExpress #Angelo...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>City of London</td>\n"," <td>United Kingdom</td>\n"," <td>GB</td>\n"," <td>-0.109400</td>\n"," <td>51.514100</td>\n"," </tr>\n"," <tr>\n"," <th>491</th>\n"," <td>2020-04-16 05:34:04</td>\n"," <td>Luanda Leaks, Brexit ou a vingança do Irão. Gr...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>492</th>\n"," <td>2020-05-25 14:43:25</td>\n"," <td>De acordo com a nova pesquisa Kantar IBOPE, a ...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Caruaru</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-35.969399</td>\n"," <td>-8.286753</td>\n"," </tr>\n"," <tr>\n"," <th>493</th>\n"," <td>2020-04-08 23:40:59</td>\n"," <td>A Lei 13.987/20 garante a distribuição dos ali...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Medianeira</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-54.104104</td>\n"," <td>-25.297434</td>\n"," </tr>\n"," <tr>\n"," <th>494</th>\n"," <td>2020-04-14 12:06:38</td>\n"," <td>A 2ª Vara de Família e Sucessões de Jacareí, e...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.638670</td>\n"," <td>-23.540780</td>\n"," </tr>\n"," <tr>\n"," <th>495</th>\n"," <td>2020-04-07 16:14:13</td>\n"," <td>O isolamento social também serve para mostrar ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Rio Branco</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-67.859657</td>\n"," <td>-9.932246</td>\n"," </tr>\n"," <tr>\n"," <th>496</th>\n"," <td>2020-03-26 18:02:28</td>\n"," <td>Enquanto o mundo está atento ao covid 19 é o B...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.358100</td>\n"," <td>-22.942800</td>\n"," </tr>\n"," <tr>\n"," <th>497</th>\n"," <td>2020-03-18 05:28:16</td>\n"," <td>#covid_19 #stayhome @ Toronto, Ontario https:/...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Toronto</td>\n"," <td>Canada</td>\n"," <td>CA</td>\n"," <td>-79.387200</td>\n"," <td>43.648000</td>\n"," </tr>\n"," <tr>\n"," <th>498</th>\n"," <td>2020-03-03 21:27:11</td>\n"," <td>Um vira-lata sem Coronavirus #joeviralata #dog...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>499</th>\n"," <td>2020-01-21 13:18:03</td>\n"," <td>Portugal já está a preparar-se para responder ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" data ... longitude\n","490 2020-04-16 19:29:12 ... 51.514100\n","491 2020-04-16 05:34:04 ... 38.747518\n","492 2020-05-25 14:43:25 ... -8.286753\n","493 2020-04-08 23:40:59 ... -25.297434\n","494 2020-04-14 12:06:38 ... -23.540780\n","495 2020-04-07 16:14:13 ... -9.932246\n","496 2020-03-26 18:02:28 ... -22.942800\n","497 2020-03-18 05:28:16 ... 43.648000\n","498 2020-03-03 21:27:11 ... -23.550000\n","499 2020-01-21 13:18:03 ... 38.747518\n","\n","[10 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":80}]},{"cell_type":"code","metadata":{"id":"m8zOmXTRzg7v","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":35},"executionInfo":{"status":"ok","timestamp":1597087103408,"user_tz":180,"elapsed":799,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"a6617683-8ee2-4bc8-9079-467bf957c3b3"},"source":["dt.loc[0, 'pais']"],"execution_count":87,"outputs":[{"output_type":"execute_result","data":{"application/vnd.google.colaboratory.intrinsic+json":{"type":"string"},"text/plain":["'Brazil'"]},"metadata":{"tags":[]},"execution_count":87}]},{"cell_type":"code","metadata":{"id":"93biQu_Vz-pp","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597087224276,"user_tz":180,"elapsed":855,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"7b613ab5-2b9b-4cb8-b53d-865c8e736536"},"source":["dt.loc[dt.sigla == 'BR']"],"execution_count":91,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>2020-05-23 00:21:14</td>\n"," <td>Para voltar tudo ao normal, você precisa fazer...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio das Ostras</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.937900</td>\n"," <td>-22.522600</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2020-03-22 22:57:51</td>\n"," <td>14.245 – O que é a hidroxicloroquina? https://...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.674739</td>\n"," <td>-23.606067</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>2020-05-25 20:45:43</td>\n"," <td>COVID-19 | Hospital municipal Tide Setúbal, n...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>2020-04-15 10:34:39</td>\n"," <td>#cenasdocotidiano #santos #distanciamentosocia...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Santos</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.293700</td>\n"," <td>-23.975947</td>\n"," </tr>\n"," <tr>\n"," <th>7</th>\n"," <td>2020-03-22 19:12:37</td>\n"," <td>Memórias do cárcere. Hoje deu até pra treinar ...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.273900</td>\n"," <td>-22.961900</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>493</th>\n"," <td>2020-04-08 23:40:59</td>\n"," <td>A Lei 13.987/20 garante a distribuição dos ali...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Medianeira</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-54.104104</td>\n"," <td>-25.297434</td>\n"," </tr>\n"," <tr>\n"," <th>494</th>\n"," <td>2020-04-14 12:06:38</td>\n"," <td>A 2ª Vara de Família e Sucessões de Jacareí, e...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.638670</td>\n"," <td>-23.540780</td>\n"," </tr>\n"," <tr>\n"," <th>495</th>\n"," <td>2020-04-07 16:14:13</td>\n"," <td>O isolamento social também serve para mostrar ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Rio Branco</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-67.859657</td>\n"," <td>-9.932246</td>\n"," </tr>\n"," <tr>\n"," <th>496</th>\n"," <td>2020-03-26 18:02:28</td>\n"," <td>Enquanto o mundo está atento ao covid 19 é o B...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.358100</td>\n"," <td>-22.942800</td>\n"," </tr>\n"," <tr>\n"," <th>498</th>\n"," <td>2020-03-03 21:27:11</td>\n"," <td>Um vira-lata sem Coronavirus #joeviralata #dog...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>392 rows × 9 columns</p>\n","</div>"],"text/plain":[" data ... longitude\n","0 2020-05-23 00:21:14 ... -22.522600\n","1 2020-03-22 22:57:51 ... -23.606067\n","3 2020-05-25 20:45:43 ... -23.550000\n","4 2020-04-15 10:34:39 ... -23.975947\n","7 2020-03-22 19:12:37 ... -22.961900\n",".. ... ... ...\n","493 2020-04-08 23:40:59 ... -25.297434\n","494 2020-04-14 12:06:38 ... -23.540780\n","495 2020-04-07 16:14:13 ... -9.932246\n","496 2020-03-26 18:02:28 ... -22.942800\n","498 2020-03-03 21:27:11 ... -23.550000\n","\n","[392 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":91}]},{"cell_type":"code","metadata":{"id":"uxVYadfu0hcw","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597087404901,"user_tz":180,"elapsed":946,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"76d4b50d-b75e-429c-e009-1751b5b834e6"},"source":["dt.loc[dt.pais == 'Portugal', ['texto', 'latitude', 'longitude']]"],"execution_count":95,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>texto</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>2</th>\n"," <td>Quarta morte em Lar de Estarreja associada à C...</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>8</th>\n"," <td>Bélgica ultrapassa barreira das 5.000 mortes p...</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>9</th>\n"," <td>Covid-19 | Ninguém paga água no concelho - Até...</td>\n"," <td>-7.791839</td>\n"," <td>41.823221</td>\n"," </tr>\n"," <tr>\n"," <th>10</th>\n"," <td>Mais de 23 mil mortes e 505 mil infeções em to...</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>18</th>\n"," <td>Quarta morte por Covid-19 em Portugal. Primeir...</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>466</th>\n"," <td>Coronavírus. Macau cria centro de contingência...</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>477</th>\n"," <td>Coronavírus encerra Cidade Proibida de Pequim ...</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>481</th>\n"," <td>Santa Maria abre primeira enfermaria do país e...</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>491</th>\n"," <td>Luanda Leaks, Brexit ou a vingança do Irão. Gr...</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>499</th>\n"," <td>Portugal já está a preparar-se para responder ...</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>67 rows × 3 columns</p>\n","</div>"],"text/plain":[" texto latitude longitude\n","2 Quarta morte em Lar de Estarreja associada à C... -9.099043 38.747518\n","8 Bélgica ultrapassa barreira das 5.000 mortes p... -9.099043 38.747518\n","9 Covid-19 | Ninguém paga água no concelho - Até... -7.791839 41.823221\n","10 Mais de 23 mil mortes e 505 mil infeções em to... -9.099043 38.747518\n","18 Quarta morte por Covid-19 em Portugal. Primeir... -9.099043 38.747518\n",".. ... ... ...\n","466 Coronavírus. Macau cria centro de contingência... -9.099043 38.747518\n","477 Coronavírus encerra Cidade Proibida de Pequim ... -9.099043 38.747518\n","481 Santa Maria abre primeira enfermaria do país e... -9.099043 38.747518\n","491 Luanda Leaks, Brexit ou a vingança do Irão. Gr... -9.099043 38.747518\n","499 Portugal já está a preparar-se para responder ... -9.099043 38.747518\n","\n","[67 rows x 3 columns]"]},"metadata":{"tags":[]},"execution_count":95}]},{"cell_type":"code","metadata":{"id":"RhEF2QVa1Cvt","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":284},"executionInfo":{"status":"ok","timestamp":1597087447654,"user_tz":180,"elapsed":1034,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"b1c190f4-7b60-4117-d3bd-d85f42866b2b"},"source":["dt.describe()"],"execution_count":98,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>retweet</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>count</th>\n"," <td>500.000000</td>\n"," <td>500.000000</td>\n"," <td>500.000000</td>\n"," </tr>\n"," <tr>\n"," <th>mean</th>\n"," <td>0.172000</td>\n"," <td>-37.740097</td>\n"," <td>-6.647530</td>\n"," </tr>\n"," <tr>\n"," <th>std</th>\n"," <td>0.508855</td>\n"," <td>27.472123</td>\n"," <td>23.794104</td>\n"," </tr>\n"," <tr>\n"," <th>min</th>\n"," <td>0.000000</td>\n"," <td>-118.244500</td>\n"," <td>-37.818769</td>\n"," </tr>\n"," <tr>\n"," <th>25%</th>\n"," <td>0.000000</td>\n"," <td>-47.770895</td>\n"," <td>-23.482323</td>\n"," </tr>\n"," <tr>\n"," <th>50%</th>\n"," <td>0.000000</td>\n"," <td>-43.814959</td>\n"," <td>-15.800000</td>\n"," </tr>\n"," <tr>\n"," <th>75%</th>\n"," <td>0.000000</td>\n"," <td>-35.722654</td>\n"," <td>-5.172423</td>\n"," </tr>\n"," <tr>\n"," <th>max</th>\n"," <td>4.000000</td>\n"," <td>174.765000</td>\n"," <td>52.087400</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" retweet latitude longitude\n","count 500.000000 500.000000 500.000000\n","mean 0.172000 -37.740097 -6.647530\n","std 0.508855 27.472123 23.794104\n","min 0.000000 -118.244500 -37.818769\n","25% 0.000000 -47.770895 -23.482323\n","50% 0.000000 -43.814959 -15.800000\n","75% 0.000000 -35.722654 -5.172423\n","max 4.000000 174.765000 52.087400"]},"metadata":{"tags":[]},"execution_count":98}]},{"cell_type":"code","metadata":{"id":"iTF9Sb-f1M20","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":175},"executionInfo":{"status":"ok","timestamp":1597087480920,"user_tz":180,"elapsed":1056,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"d2472791-03e4-45e9-8a58-7aa3f324bece"},"source":["dt.retweet.describe()"],"execution_count":99,"outputs":[{"output_type":"execute_result","data":{"text/plain":["count 500.000000\n","mean 0.172000\n","std 0.508855\n","min 0.000000\n","25% 0.000000\n","50% 0.000000\n","75% 0.000000\n","max 4.000000\n","Name: retweet, dtype: float64"]},"metadata":{"tags":[]},"execution_count":99}]},{"cell_type":"code","metadata":{"id":"sMcSQE351RKQ","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":105},"executionInfo":{"status":"ok","timestamp":1597087510288,"user_tz":180,"elapsed":868,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"f72cd14b-4e70-4ac3-894f-16088e6e3a59"},"source":["dt.pais.describe()"],"execution_count":102,"outputs":[{"output_type":"execute_result","data":{"text/plain":["count 500\n","unique 22\n","top Brazil\n","freq 392\n","Name: pais, dtype: object"]},"metadata":{"tags":[]},"execution_count":102}]},{"cell_type":"code","metadata":{"id":"ih9VxWFY1ewr","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":122},"executionInfo":{"status":"ok","timestamp":1597087545973,"user_tz":180,"elapsed":917,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"8ad1412b-4599-4885-9b32-36a3e43df82b"},"source":["dt.pais.unique()"],"execution_count":103,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array(['Brazil', 'Portugal', 'Vatican City', 'Canada', 'United States',\n"," 'Indonesia', 'Spain', 'Australia', 'Mexico', 'The Netherlands',\n"," 'Switzerland', 'New Zealand', 'Curaçao', 'Italy', 'India',\n"," 'Dominican Republic', 'Ecuador', \"People's Republic of China\",\n"," 'Namibia', 'France', 'Republic of Mozambique', 'United Kingdom'],\n"," dtype=object)"]},"metadata":{"tags":[]},"execution_count":103}]},{"cell_type":"code","metadata":{"id":"wQW_Bs0b1joR","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"executionInfo":{"status":"ok","timestamp":1597087565158,"user_tz":180,"elapsed":861,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"244a7875-5bd3-4695-af0a-123ab310b25d"},"source":["type(dt.pais.unique())"],"execution_count":104,"outputs":[{"output_type":"execute_result","data":{"text/plain":["numpy.ndarray"]},"metadata":{"tags":[]},"execution_count":104}]},{"cell_type":"code","metadata":{"id":"Bl3-C6rd1s7S","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":404},"executionInfo":{"status":"ok","timestamp":1597087611394,"user_tz":180,"elapsed":823,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"bce868b7-279b-4705-b40d-ec54d4043cff"},"source":["dt.sigla.value_counts()"],"execution_count":106,"outputs":[{"output_type":"execute_result","data":{"text/plain":["BR 392\n","PT 67\n","US 11\n","CA 6\n","ES 3\n","AU 2\n","FR 2\n","NZ 2\n","IT 2\n","GB 1\n","MZ 1\n","NL 1\n","IN 1\n","MX 1\n","CN 1\n","ID 1\n","EC 1\n","VA 1\n","CW 1\n","DO 1\n","CH 1\n","Name: sigla, dtype: int64"]},"metadata":{"tags":[]},"execution_count":106}]},{"cell_type":"code","metadata":{"id":"7-BVW7SF10wj","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"executionInfo":{"status":"ok","timestamp":1597087634732,"user_tz":180,"elapsed":908,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"606cad99-00f9-4ed1-bb34-459faaf5ddba"},"source":["type(dt.sigla.value_counts())"],"execution_count":107,"outputs":[{"output_type":"execute_result","data":{"text/plain":["pandas.core.series.Series"]},"metadata":{"tags":[]},"execution_count":107}]},{"cell_type":"code","metadata":{"id":"hurqow8j13l0","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":422},"executionInfo":{"status":"ok","timestamp":1597087697236,"user_tz":180,"elapsed":771,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"31c598e3-8788-44c6-8b92-5a5c886cf724"},"source":["# Agrupamento de dados\n","\n","dt.groupby('sigla').sigla.count()"],"execution_count":113,"outputs":[{"output_type":"execute_result","data":{"text/plain":["sigla\n","AU 2\n","BR 392\n","CA 6\n","CH 1\n","CN 1\n","CW 1\n","DO 1\n","EC 1\n","ES 3\n","FR 2\n","GB 1\n","ID 1\n","IN 1\n","IT 2\n","MX 1\n","MZ 1\n","NL 1\n","NZ 2\n","PT 67\n","US 11\n","VA 1\n","Name: sigla, dtype: int64"]},"metadata":{"tags":[]},"execution_count":113}]},{"cell_type":"code","metadata":{"id":"uo1ihcGH2FsP","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"executionInfo":{"status":"ok","timestamp":1597087708334,"user_tz":180,"elapsed":733,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"94ba0079-242b-4242-f163-ea7a4e0e24d1"},"source":["type(dt.groupby('sigla').sigla.count())"],"execution_count":114,"outputs":[{"output_type":"execute_result","data":{"text/plain":["pandas.core.series.Series"]},"metadata":{"tags":[]},"execution_count":114}]},{"cell_type":"code","metadata":{"id":"LKA8fost2QZg","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":422},"executionInfo":{"status":"ok","timestamp":1597087834309,"user_tz":180,"elapsed":510,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"1d466510-0ce7-459f-f250-11cde3350f56"},"source":["dt.groupby('sigla').retweet.max()"],"execution_count":122,"outputs":[{"output_type":"execute_result","data":{"text/plain":["sigla\n","AU 1\n","BR 3\n","CA 2\n","CH 0\n","CN 0\n","CW 0\n","DO 0\n","EC 0\n","ES 0\n","FR 0\n","GB 1\n","ID 0\n","IN 0\n","IT 0\n","MX 0\n","MZ 0\n","NL 0\n","NZ 0\n","PT 4\n","US 2\n","VA 0\n","Name: retweet, dtype: int64"]},"metadata":{"tags":[]},"execution_count":122}]},{"cell_type":"code","metadata":{"id":"U9N2aDwQ2oRi","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597087912637,"user_tz":180,"elapsed":1010,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"7c6871ac-9d47-48a0-85a0-ebdd2627945c"},"source":["dt.sort_values(by='data', ascending=True)"],"execution_count":127,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>216</th>\n"," <td>2020-01-14 01:01:54</td>\n"," <td>O isolamento social é um problema cada vez mai...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Salvador</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-38.521809</td>\n"," <td>-13.005499</td>\n"," </tr>\n"," <tr>\n"," <th>466</th>\n"," <td>2020-01-21 12:01:34</td>\n"," <td>Coronavírus. Macau cria centro de contingência...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>499</th>\n"," <td>2020-01-21 13:18:03</td>\n"," <td>Portugal já está a preparar-se para responder ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>477</th>\n"," <td>2020-01-23 14:49:02</td>\n"," <td>Coronavírus encerra Cidade Proibida de Pequim ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>435</th>\n"," <td>2020-01-23 15:27:32</td>\n"," <td>\"É impressionante.\" Português descreve vida em...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>476</th>\n"," <td>2020-05-31 15:36:34</td>\n"," <td>\"É difícil ver as pessoas morrendo, sendo trat...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.369131</td>\n"," <td>-22.968272</td>\n"," </tr>\n"," <tr>\n"," <th>390</th>\n"," <td>2020-05-31 16:51:03</td>\n"," <td>Existe vida mais barata , mas também existe vi...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Angra dos Reis</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-44.338708</td>\n"," <td>-22.940978</td>\n"," </tr>\n"," <tr>\n"," <th>157</th>\n"," <td>2020-05-31 19:48:33</td>\n"," <td>[Vitrine Virtual @Dadynha ] Divulgação voluntá...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Maranguape</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-38.692004</td>\n"," <td>-3.896802</td>\n"," </tr>\n"," <tr>\n"," <th>351</th>\n"," <td>2020-05-31 20:26:27</td>\n"," <td>Como cidadão, à condição de uma jovem idosa. E...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>São Sebastião</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-36.548780</td>\n"," <td>-9.931810</td>\n"," </tr>\n"," <tr>\n"," <th>464</th>\n"," <td>2020-05-31 22:48:54</td>\n"," <td>SOCIEDADE HIPÓCRITA. CORONAVÍRUS... em Magalhã...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Guanambi</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-42.776079</td>\n"," <td>-14.216078</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>500 rows × 9 columns</p>\n","</div>"],"text/plain":[" data ... longitude\n","216 2020-01-14 01:01:54 ... -13.005499\n","466 2020-01-21 12:01:34 ... 38.747518\n","499 2020-01-21 13:18:03 ... 38.747518\n","477 2020-01-23 14:49:02 ... 38.747518\n","435 2020-01-23 15:27:32 ... 38.747518\n",".. ... ... ...\n","476 2020-05-31 15:36:34 ... -22.968272\n","390 2020-05-31 16:51:03 ... -22.940978\n","157 2020-05-31 19:48:33 ... -3.896802\n","351 2020-05-31 20:26:27 ... -9.931810\n","464 2020-05-31 22:48:54 ... -14.216078\n","\n","[500 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":127}]},{"cell_type":"code","metadata":{"id":"CupziztX29by","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597088105395,"user_tz":180,"elapsed":894,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"df240504-0d5b-4abe-f031-319bf85deb8e"},"source":["dt.loc[dt.sigla == 'BR'].sort_values(by=['pais', 'lugar'])"],"execution_count":135,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>153</th>\n"," <td>2020-04-09 21:28:32</td>\n"," <td>FAÇA O SEU CONSÓRCIO, FINANCIAMENTO OU O SEU S...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Abre Campo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-42.476260</td>\n"," <td>-20.298590</td>\n"," </tr>\n"," <tr>\n"," <th>353</th>\n"," <td>2020-04-14 12:54:32</td>\n"," <td>#covid #angradosreis #covid_19 #coronavirusbra...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Angra dos Reis</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-44.305500</td>\n"," <td>-22.997500</td>\n"," </tr>\n"," <tr>\n"," <th>390</th>\n"," <td>2020-05-31 16:51:03</td>\n"," <td>Existe vida mais barata , mas também existe vi...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Angra dos Reis</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-44.338708</td>\n"," <td>-22.940978</td>\n"," </tr>\n"," <tr>\n"," <th>455</th>\n"," <td>2020-03-08 19:30:30</td>\n"," <td>O programa Passando a Limpo com Carla Machado ...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Angra dos Reis</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-44.317986</td>\n"," <td>-23.007902</td>\n"," </tr>\n"," <tr>\n"," <th>119</th>\n"," <td>2020-05-19 15:38:47</td>\n"," <td>ATENÇÃO! ⚠🔊🚨 Confira acima os horários do esca...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Aparecida de Goiânia</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-49.269078</td>\n"," <td>-16.735491</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>159</th>\n"," <td>2020-03-19 20:53:17</td>\n"," <td>Comunicado sobre a pandemia da Covid-19 e o fu...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Vitória</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-40.289934</td>\n"," <td>-20.317303</td>\n"," </tr>\n"," <tr>\n"," <th>233</th>\n"," <td>2020-04-15 22:22:28</td>\n"," <td>Já fizemos quarentena. Já deu tempo de prepara...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Vitória</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-40.337800</td>\n"," <td>-20.318900</td>\n"," </tr>\n"," <tr>\n"," <th>417</th>\n"," <td>2020-05-22 22:28:01</td>\n"," <td>Da série \"O que nossos alunos estão fazendo na...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Vitória da Conquista</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-40.850000</td>\n"," <td>-14.850000</td>\n"," </tr>\n"," <tr>\n"," <th>152</th>\n"," <td>2020-03-31 23:16:45</td>\n"," <td>O mundo não é mais o mesmo depois dessa #pande...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Vitória de Santo Antão</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-35.295800</td>\n"," <td>-8.119400</td>\n"," </tr>\n"," <tr>\n"," <th>142</th>\n"," <td>2020-03-18 21:26:56</td>\n"," <td>#moraesesilvaadvogados #hebersonmoraesadvogado...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Volta Redonda</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-44.103900</td>\n"," <td>-22.522800</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>392 rows × 9 columns</p>\n","</div>"],"text/plain":[" data ... longitude\n","153 2020-04-09 21:28:32 ... -20.298590\n","353 2020-04-14 12:54:32 ... -22.997500\n","390 2020-05-31 16:51:03 ... -22.940978\n","455 2020-03-08 19:30:30 ... -23.007902\n","119 2020-05-19 15:38:47 ... -16.735491\n",".. ... ... ...\n","159 2020-03-19 20:53:17 ... -20.317303\n","233 2020-04-15 22:22:28 ... -20.318900\n","417 2020-05-22 22:28:01 ... -14.850000\n","152 2020-03-31 23:16:45 ... -8.119400\n","142 2020-03-18 21:26:56 ... -22.522800\n","\n","[392 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":135}]},{"cell_type":"code","metadata":{"id":"rTTbUu2C4CkL","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597088290588,"user_tz":180,"elapsed":769,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"3d8ab44a-18f4-46a5-8066-f2ba6d75f057"},"source":["dt.sort_values(by='sigla', ascending=True)"],"execution_count":141,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>86</th>\n"," <td>2020-03-19 20:45:14</td>\n"," <td>As pesquisas não param! 💻 A equipe do Lab404 s...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Melbourne</td>\n"," <td>Australia</td>\n"," <td>AU</td>\n"," <td>144.960154</td>\n"," <td>-37.818769</td>\n"," </tr>\n"," <tr>\n"," <th>354</th>\n"," <td>2020-02-21 10:34:40</td>\n"," <td>Australia’s first dedicated e-sports bar @ GG ...</td>\n"," <td>0</td>\n"," <td>en</td>\n"," <td>Melbourne</td>\n"," <td>Australia</td>\n"," <td>AU</td>\n"," <td>144.961030</td>\n"," <td>-37.816360</td>\n"," </tr>\n"," <tr>\n"," <th>0</th>\n"," <td>2020-05-23 00:21:14</td>\n"," <td>Para voltar tudo ao normal, você precisa fazer...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio das Ostras</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.937900</td>\n"," <td>-22.522600</td>\n"," </tr>\n"," <tr>\n"," <th>321</th>\n"," <td>2020-05-31 12:24:15</td>\n"," <td>Sair de casa só naquele estilo! 😎😷😅 #mascara #...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio Claro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-47.550000</td>\n"," <td>-22.400000</td>\n"," </tr>\n"," <tr>\n"," <th>320</th>\n"," <td>2020-04-03 13:24:12</td>\n"," <td>Informação é o melhor remédio contra o Coronav...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Londrina</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-51.150000</td>\n"," <td>-23.300000</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>392</th>\n"," <td>2020-05-22 15:37:07</td>\n"," <td>No blog @voandobaixo tem um texto sobre o reto...</td>\n"," <td>2</td>\n"," <td>pt</td>\n"," <td>Darlington</td>\n"," <td>United States</td>\n"," <td>US</td>\n"," <td>-79.910371</td>\n"," <td>34.294532</td>\n"," </tr>\n"," <tr>\n"," <th>123</th>\n"," <td>2020-03-27 23:23:18</td>\n"," <td>A cidade de Nova York parece um campo de guerr...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Manhattan</td>\n"," <td>United States</td>\n"," <td>US</td>\n"," <td>-74.006400</td>\n"," <td>40.714200</td>\n"," </tr>\n"," <tr>\n"," <th>203</th>\n"," <td>2020-03-22 17:41:58</td>\n"," <td>#coronavirus #covid19 #covid_19 🦠 😷 #quarantin...</td>\n"," <td>0</td>\n"," <td>it</td>\n"," <td>Montpelier</td>\n"," <td>United States</td>\n"," <td>US</td>\n"," <td>-72.598119</td>\n"," <td>44.152532</td>\n"," </tr>\n"," <tr>\n"," <th>5</th>\n"," <td>2020-03-27 22:59:12</td>\n"," <td>O Papa Francisco rezando sozinho na imensa pra...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Vatican City</td>\n"," <td>Vatican City</td>\n"," <td>VA</td>\n"," <td>12.457018</td>\n"," <td>41.902473</td>\n"," </tr>\n"," <tr>\n"," <th>399</th>\n"," <td>2020-03-19 12:30:16</td>\n"," <td>Meu #tbt de isolamento social 🏕🌵 #namibia #afr...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Namibia</td>\n"," <td>Namibia</td>\n"," <td>NaN</td>\n"," <td>17.000000</td>\n"," <td>-23.000000</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>500 rows × 9 columns</p>\n","</div>"],"text/plain":[" data ... longitude\n","86 2020-03-19 20:45:14 ... -37.818769\n","354 2020-02-21 10:34:40 ... -37.816360\n","0 2020-05-23 00:21:14 ... -22.522600\n","321 2020-05-31 12:24:15 ... -22.400000\n","320 2020-04-03 13:24:12 ... -23.300000\n",".. ... ... ...\n","392 2020-05-22 15:37:07 ... 34.294532\n","123 2020-03-27 23:23:18 ... 40.714200\n","203 2020-03-22 17:41:58 ... 44.152532\n","5 2020-03-27 22:59:12 ... 41.902473\n","399 2020-03-19 12:30:16 ... -23.000000\n","\n","[500 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":141}]},{"cell_type":"code","metadata":{"id":"21LqE3q34v1h","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":77},"executionInfo":{"status":"ok","timestamp":1597088449181,"user_tz":180,"elapsed":1304,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"85e5f321-f75c-47fb-e85e-426a316ea889"},"source":["dt[pd.isnull(dt.sigla)]"],"execution_count":142,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>399</th>\n"," <td>2020-03-19 12:30:16</td>\n"," <td>Meu #tbt de isolamento social 🏕🌵 #namibia #afr...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Namibia</td>\n"," <td>Namibia</td>\n"," <td>NaN</td>\n"," <td>17.0</td>\n"," <td>-23.0</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" data ... longitude\n","399 2020-03-19 12:30:16 ... -23.0\n","\n","[1 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":142}]},{"cell_type":"code","metadata":{"id":"Yy8DJHJ-5Aq9","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":77},"executionInfo":{"status":"ok","timestamp":1597088620735,"user_tz":180,"elapsed":926,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"c5c48e95-0c89-4724-a894-513ae91ab116"},"source":["dt[pd.isnull(dt.sigla)].fillna('PADRAO')"],"execution_count":151,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>sigla</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>399</th>\n"," <td>2020-03-19 12:30:16</td>\n"," <td>Meu #tbt de isolamento social 🏕🌵 #namibia #afr...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Namibia</td>\n"," <td>Namibia</td>\n"," <td>PADRAO</td>\n"," <td>17.0</td>\n"," <td>-23.0</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" data ... longitude\n","399 2020-03-19 12:30:16 ... -23.0\n","\n","[1 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":151}]},{"cell_type":"code","metadata":{"id":"BxjvnTAy5vPx","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":228},"executionInfo":{"status":"ok","timestamp":1597088670459,"user_tz":180,"elapsed":890,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"0c1cfe87-c162-4ea8-e3bd-35f077b7705a"},"source":["pd.isnull(dt.sigla)"],"execution_count":154,"outputs":[{"output_type":"execute_result","data":{"text/plain":["0 False\n","1 False\n","2 False\n","3 False\n","4 False\n"," ... \n","495 False\n","496 False\n","497 False\n","498 False\n","499 False\n","Name: sigla, Length: 500, dtype: bool"]},"metadata":{"tags":[]},"execution_count":154}]},{"cell_type":"code","metadata":{"id":"_RgqewF-5rSy","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"executionInfo":{"status":"ok","timestamp":1597088646386,"user_tz":180,"elapsed":912,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"946e16b7-3414-4498-a67f-8b99de432322"},"source":["type(dt[pd.isnull(dt.sigla)].fillna('PADRAO'))"],"execution_count":152,"outputs":[{"output_type":"execute_result","data":{"text/plain":["pandas.core.frame.DataFrame"]},"metadata":{"tags":[]},"execution_count":152}]},{"cell_type":"code","metadata":{"id":"WBLS_p4f5zsc","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":228},"executionInfo":{"status":"ok","timestamp":1597088732302,"user_tz":180,"elapsed":737,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"4b8c6b48-c579-4fd6-d280-06efa5eee9e7"},"source":["dt.sigla.replace('BR', 'BRA')"],"execution_count":157,"outputs":[{"output_type":"execute_result","data":{"text/plain":["0 BRA\n","1 BRA\n","2 PT\n","3 BRA\n","4 BRA\n"," ... \n","495 BRA\n","496 BRA\n","497 CA\n","498 BRA\n","499 PT\n","Name: sigla, Length: 500, dtype: object"]},"metadata":{"tags":[]},"execution_count":157}]},{"cell_type":"code","metadata":{"id":"ici0hgLx6C8J","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":402},"executionInfo":{"status":"ok","timestamp":1597088756291,"user_tz":180,"elapsed":842,"user":{"displayName":"Paulo Salvatore","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GhPi1sLE-8-tWMGTFE1pVyN5cAzhF-H3JdWk4o14Q=s64","userId":"15553628256580200178"}},"outputId":"3980d71d-2f52-44de-da76-ac1a27e29051"},"source":["dt.rename(columns={'sigla': 'codigo'})"],"execution_count":159,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>data</th>\n"," <th>texto</th>\n"," <th>retweet</th>\n"," <th>idioma</th>\n"," <th>lugar</th>\n"," <th>pais</th>\n"," <th>codigo</th>\n"," <th>latitude</th>\n"," <th>longitude</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>2020-05-23 00:21:14</td>\n"," <td>Para voltar tudo ao normal, você precisa fazer...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio das Ostras</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-41.937900</td>\n"," <td>-22.522600</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2020-03-22 22:57:51</td>\n"," <td>14.245 – O que é a hidroxicloroquina? https://...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.674739</td>\n"," <td>-23.606067</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>2020-04-14 00:11:33</td>\n"," <td>Quarta morte em Lar de Estarreja associada à C...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>2020-05-25 20:45:43</td>\n"," <td>COVID-19 | Hospital municipal Tide Setúbal, n...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>2020-04-15 10:34:39</td>\n"," <td>#cenasdocotidiano #santos #distanciamentosocia...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Santos</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.293700</td>\n"," <td>-23.975947</td>\n"," </tr>\n"," <tr>\n"," <th>...</th>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," <td>...</td>\n"," </tr>\n"," <tr>\n"," <th>495</th>\n"," <td>2020-04-07 16:14:13</td>\n"," <td>O isolamento social também serve para mostrar ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Rio Branco</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-67.859657</td>\n"," <td>-9.932246</td>\n"," </tr>\n"," <tr>\n"," <th>496</th>\n"," <td>2020-03-26 18:02:28</td>\n"," <td>Enquanto o mundo está atento ao covid 19 é o B...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Rio de Janeiro</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-43.358100</td>\n"," <td>-22.942800</td>\n"," </tr>\n"," <tr>\n"," <th>497</th>\n"," <td>2020-03-18 05:28:16</td>\n"," <td>#covid_19 #stayhome @ Toronto, Ontario https:/...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Toronto</td>\n"," <td>Canada</td>\n"," <td>CA</td>\n"," <td>-79.387200</td>\n"," <td>43.648000</td>\n"," </tr>\n"," <tr>\n"," <th>498</th>\n"," <td>2020-03-03 21:27:11</td>\n"," <td>Um vira-lata sem Coronavirus #joeviralata #dog...</td>\n"," <td>0</td>\n"," <td>pt</td>\n"," <td>Sao Paulo</td>\n"," <td>Brazil</td>\n"," <td>BR</td>\n"," <td>-46.633300</td>\n"," <td>-23.550000</td>\n"," </tr>\n"," <tr>\n"," <th>499</th>\n"," <td>2020-01-21 13:18:03</td>\n"," <td>Portugal já está a preparar-se para responder ...</td>\n"," <td>1</td>\n"," <td>pt</td>\n"," <td>Lisbon</td>\n"," <td>Portugal</td>\n"," <td>PT</td>\n"," <td>-9.099043</td>\n"," <td>38.747518</td>\n"," </tr>\n"," </tbody>\n","</table>\n","<p>500 rows × 9 columns</p>\n","</div>"],"text/plain":[" data ... longitude\n","0 2020-05-23 00:21:14 ... -22.522600\n","1 2020-03-22 22:57:51 ... -23.606067\n","2 2020-04-14 00:11:33 ... 38.747518\n","3 2020-05-25 20:45:43 ... -23.550000\n","4 2020-04-15 10:34:39 ... -23.975947\n",".. ... ... ...\n","495 2020-04-07 16:14:13 ... -9.932246\n","496 2020-03-26 18:02:28 ... -22.942800\n","497 2020-03-18 05:28:16 ... 43.648000\n","498 2020-03-03 21:27:11 ... -23.550000\n","499 2020-01-21 13:18:03 ... 38.747518\n","\n","[500 rows x 9 columns]"]},"metadata":{"tags":[]},"execution_count":159}]}]}