📅 2023-06-29 — Session: Enhanced DataFrame manipulation with Pandas

🕒 19:05–19:30
🏷️ Labels: Python, Pandas, Data Processing, Time Calculation, Dataframe
📂 Project: Dev
⭐ Priority: MEDIUM

Session Goal

The session aimed to enhance data manipulation techniques using Pandas in Python, focusing on processing JSON files and performing various time calculations and transformations.

Key Activities

  • Developed a Python script to process JSON files containing location visit data, extracting relevant information and separating timestamps into date and hour components.
  • Corrected the use of pd.to_datetime for ISO 8601 format in JSON data.
  • Calculated durations in hours and minutes using Pandas and Python’s divmod() function, adding these as new columns to DataFrames.
  • Converted decimal hours to hexadecimal using Python’s hex() function.
  • Formatted time in DataFrames and adjusted time zones from GMT+0 to GMT-3.
  • Extracted weekdays from dates in Spanish and mapped them using a dictionary.
  • Generated phrases from DataFrame rows based on date and time formatting.

Achievements

  • Successfully implemented multiple data manipulation techniques in Pandas, enhancing the ability to handle and transform time-related data in DataFrames.

Pending Tasks

  • Further exploration of advanced time manipulation techniques and their applications in different data contexts.