# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

trips=pd.read_csv('trips.csv')


import redis
import pandas as pd

# +
trips=pd.read_csv('trips.csv')

date_sorted_trips = trips.sort_values(by='end_date')

date_sorted_trips.head()
# -

for trip in date_sorted_trips.itertuples():
  print(trip.end_date, '', trip.bike_number, '', trip.end_station_name)

current_bike_locations = redis.Redis(host='redis', port='6379')
current_bike_locations.keys()

for trip in date_sorted_trips.itertuples():
  current_bike_locations.set(trip.bike_number, trip.end_station_name)

current_bike_locations.keys()

current_bike_locations.get('92')



StarcoderdataJupyterScriptsDedupFiltered