import pystan
import pickle
import math
import pandas as pd
import datetime
import numpy as np
from scipy import integrate
import scipy.stats as st
import pandas.tseries.offsets as offsets
import multiprocessing as mp
import matplotlib.pyplot as plt
%matplotlib inline
url = "/content/drive/My Drive/covid19/JapaneseDataCOVID19 (200510).csv"
df = pd.read_csv(url)
df.head()
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
print('Number of data: ',len(df))
# reported と confirmed を重複なしで結合
report = []
for i in range(len(df.reported)):
if type(df.reported[i]) == str:
report.append(df.reported[i])
else:
if type(df.confirmed[i]) == str:
report.append(df.confirmed[i])
else:
report.append(np.nan)
df.reported = report
df = df.drop('confirmed',axis=1)
df.head()