Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

space weather dashboard build your own custom dashboard to analyze and predict weather

for line in fileobject:
    row_bytes = line.split()

    date = row_bytes[0].decode("utf-8") + "-" + row_bytes[1].decode("utf-8") + "-" + row_bytes[2].decode("utf-8")    row_txt = [date, row_bytes[4].decode("utf-8"), row_bytes[5].decode("utf-8"), row_bytes[6].decode("utf-8")]    a_series = pd.Series(row_txt, index = df.columns)
    
    query = 'INSERT INTO sunspots (date, sunspot_count, sunspot_sd, sunspot_obs_no) VALUES ("%s", "%s", "%s", "%s")' % (a_series["Date"], a_series["Sunspot_count"], a_series["Sunspot_sd"], a_series["Observ_No"])    cur.execute(query)
Source by www.analyticsvidhya.com #
 
PREVIOUS NEXT
Tagged: #space #weather #dashboard #build #custom #dashboard #analyze #predict #weather
ADD COMMENT
Topic
Name
9+1 =