数据分析作业

  1. import pandas as pd
  2. import numpy as np
  3. import matplotlib.pyplot as plt
  4. import seaborn as sns
  5. import scipy.stats as stats
  6. %matplotlib inline
  7. plt.style.use('ggplot')
  8. import plotly.express as px
  9. import plotly.graph_objs as go
  10. from plotly.offline import iplot, init_notebook_mode
  11. import plotly.figure_factory as ff
  12. from plotly import subplots
  13. from plotly.subplots import make_subplots 
  14. init_notebook_mode(connected=True)
  15. from datetime import datetime, date, timedelta
  16. from fbprophet import Prophet
  17. import warnings
  18. warnings.filterwarnings('ignore')
  19. pd.set_option('display.max_columns', 100)
  20. pd.set_option('display.max_rows', 100)
  21. import os
  22. for dirname, _, filenames in os.walk('/kaggle/input'): 
  23. print(os.path.join(dirname, filename)
  24. fig = px.bar(df, x='Date', y='Confirmed', hover_data=['Province/State', 'Deaths', 'Recovered'], color='Country')
  25. annotations = []
  26. annotations.append(dict(xref='paper', yref='paper', x=0.0
  27. xanchor='left', yanchor='bottom',
  28. text='Confirmed bar plot for each country'
  29. font=dict(family='Arial')
  30. size=30
  31. color='rgb(37,37,37)')
  32. showarrow=False))
  33. fig.update_layout(annotations=annotations)
  34. fig.show()
posted @ 2020-05-10 19:25  丁超毅  阅读(242)  评论(0)    收藏  举报