yadavsaurabh/indian-railways-runs
Indian Railways: stop-level running and delay history One row is one train, at one station, on one day. What time it was due, what time it actually turned up, and how late that was. One CSV per train, named by its five digit train number. 12624.csv holds every recorded run of train 12624, oldest first. Every file has the same 24 columns. The files are split across two folders, because the Hub allows at most 10,000 files per folder. The split is by the train number's first digit:… See the full description on the dataset page: https://huggingface.co/datasets/yadavsaurabh/indian-railways-runs.
Indian Railways: stop-level running and delay history
One row is one train, at one station, on one day. What time it was due, what time it actually turned up, and how late that was.
One CSV per train, named by its five digit train number. 12624.csv holds every recorded run of train 12624, oldest first. Every file has the same 24 columns.
The files are split across two folders, because the Hub allows at most 10,000 files per folder. The split is by the train number's first digit:
load_dataset("yadavsaurabh/indian-railways-runs") reads both as one table. To load one half, name it: load_dataset("yadavsaurabh/indian-railways-runs", "trains_1").
import pandas as pd
one = pd.read_csv("trains/12624.csv", dtype={"train_no": str}, parse_dates=["date"])
obs = one[one.reported == 1] # the rows that were actually observedA journey is (train_no, date). date is the day the train left its origin and stays fixed across the whole run; the per-stop *_date columns are what move past midnight.
Read this before computing anything
reported is 1 when a stop filed a live status update and 0 when it never did. A blank act_arrival is not an on-time arrival, it is an absence of evidence. About 3 stops in 23 never report, and it is systematically the same quiet stations, so filter on reported == 1 first.
Delays are never negative. The source reports 0 for on time and 0 for early. Punctuality figures from this data are a lower bound, not a symmetric measure.
March 2020 to late 2021 is empty for most trains, around 650 consecutive days, because passenger services stopped. A few specials ran and they are here. That gap is real history, not missing data.
Columns
Where it came from
Harvested from the public live_status cache behind whereismytrain.in, one request per train per day, flattened to one row per scheduled stop. Nothing is imputed or smoothed; blank means the source returned nothing.
This is an independent third-party collection. It is not affiliated with or endorsed by whereismytrain.in or Indian Railways.
