Introduction to data-science tools in Bluemix – Part 5

Extracting the Year and the month from a data-frame Before we start looking at the visualization of data in this recipie, lets first review from the previous recepie how we extract the X and Y co-ordinates to present. Often you are looking for seasonal trends, to do this, extracting records based on years or months is a common prerequisite. The following code extracts the month or year. Often you are looking for seasonal trends, to do this, extracting records based on years or months is a common prerequisite. The following code extracts the month or year. year_df = new_construction_dollars_builds[“date_update”].dt.yearprint year_dfmonth_df = new_construction_dollars_builds[“date_update”].dt.monthprint month_df Lets take this example a little further to make it useful. Lets extract ALL the records from our dataframe for a specific month, in this case, December.…


Link to Full Article: Introduction to data-science tools in Bluemix – Part 5