Data science with Python Part 1

Опубликовано: 13 Март 2021
на канале: Mr Automation
67
4

*covid NL
*python
*datascience modules
*create tables
*alter tables
*columns
*table.with_column
*table.with_columns
*Table().read_table
*select
*where
*group


if you want to test yourself here is the code:

from datascience import *
import numpy as np
import pandas as pd
%matplotlib inline
import matplotlib.pyplot as plots
plots.style.use('fivethirtyeight')

url = 'https://data.rivm.nl/covid-19/COVID-1...
nl = Table().read_table(url, delimiter=';')

all_reported_province = nl.select('Province', 'Total_reported').where('Total_reported', are.above(0)).group('Province', sum)

nl.select('Hospital_admission', 'Province', 'Deceased').group('Province', sum).barh('Province')

result = nl.select('Security_region_name', 'Total_reported').where('Total_reported', are.above(0))
result.group('Security_region_name').sort('count', descending=True).barh('Security_region_name')

nl_top10_cities_total_reported = nl.select('Municipality_name', 'Total_reported').group('Municipality_name', sum).sort('Total_reported sum', descending=True).take(np.arange(0,10))

nl_top10_cities_total_reported.barh('Municipality_name')

percentdying = province_grouped.column(3) / province_grouped.column(1)
percentdying_in_hospital = province_grouped.column(2) / province_grouped.column(1)
new = province_grouped.with_columns(
'percent died', percentdying,
'percent in hospital', percentdying_in_hospital
)
new.set_format('percent died', PercentFormatter)#.sort('percent died', descending=True)
new.set_format('percent in hospital', PercentFormatter)#.sort('percent died', descending=True)

new.barh(0)


Смотрите видео Data science with Python Part 1 онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Mr Automation 13 Март 2021. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 67 раз и оно понравилось 4 посетителям.