Python Help: Hi I'm stuck on my code, I need to be able to grabthe dates and Select data for the 30-year period(January 1988 to December 2018). and to Store the selection ina new variable 'selection'
C import pandas as pd import pandas_datareader as pdr import matplotlib.pyplot as plt from datetime import date df = pd. read_csv('helsinki-vantaa.csv.csv', parse_dates=['DATE'], index_col=['DATE']) df.index df.head() #print (len (data)) rows_count = len(df.index) rows_count = len(df.axes[0]) rows_count= df.shape [0] rows_count = df.count()[0] print (df) TEMP_F TEMP_C_REF_TEMP_C DIFF C DATE 1952-01-01 29740 28.347826 -2.028986 -4.936650 2.907665 1953-01-01 29740 22.190083 -5.449954 -4.936650 -0.513304 1954-01-01 29740 19.864407 -6.741996 -4.936650 -1.805346 1955-01-01 29740 22.583333 -5.231481 -4.936650 -0.294831 1956-01-01 29740 18.254237 -7.636535 -4.936650 -2.699885 USAF -3.108102 2.179692 -3.108102 5.274318 2014-12-01 29740 30.328862 -0.928410 2015-12-01 29740 35.899190 2.166217 2016-12-01 29740 2017-12-01 29740 33.445045 0.802803 -3.108102 3.910905 2018-12-01 29740 28.632289 -1.870950 -3.108102 1.237151 30.536970 -0.812794 -3.108102 2.295308 [706 rows x 5 columns]
Python Help: Hi I'm stuck on my code, I need to be able to grab the dates and Select data for the 30-year period (Januar
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am