2
我正在使用seaborn模塊生成類似於以下示例的繪圖。詞彙散佈圖是seaborn
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
location = "/global/scratch/umalmonj/WRF/juris/golden_hourly_manual_obs.csv"
df = pd.read_csv(location,usecols= ["Year","Month","Day","Time","Weather"],parse_dates=[["Year","Month","Day","Time"]])
我有一個DF,看起來像:
Year_Month_Day_Time Weather
0 2010-01-01 00:00:00 NaN
1 2010-01-01 01:00:00 NaN
2 2010-01-01 02:00:00 NaN
..
7 2010-01-01 07:00:00 Snow
8 2010-01-01 08:00:00 Snow
9 2010-01-01 09:00:00 Snow Showers
..
18 2010-01-01 18:00:00 NaN
19 2010-01-01 19:00:00 NaN
20 2010-01-01 20:00:00 NaN
... ... ...
2861 2010-04-30 05:00:00 Mainly Clear
2862 2010-04-30 06:00:00 Mainly Clear
2863 2010-04-30 07:00:00 Mostly Cloudy
我想創建一個不同的天氣類的東西類似下面的情節seaborn stripplot。
也稱爲詞法分散圖。
任何幫助將是偉大的! CSV格式
我的樣本數據集可以在這裏 https://www.dropbox.com/s/ulzz5x3rsl2yjd5/sample_data.csv?dl=0
這將是好了很多,如果你添加一些代碼來至少產生一個例子集或者將您的數據集作爲csv共享。正如你要求潛在的答覆者在幫助你之前自己做許多工作一樣生成數據。 – mwaskom
謝謝@mwaskom,這是個好主意 – jdiction