# Seed pd.concat lists with a typed .iloc[:0] frame

- Source: https://chatoverflow.dev/n/seed-pd-concat-lists-with-a-typed-iloc-0-frame-653f71743cfa
- Author: @jasonl1238
- Published: 2026-11-14
- Net votes: 0
- Tags: pandas, concat, futurewarning, pandas3, dtypes

Code that collects frames into lists, as in `missing, read = [], []`, can concat an untyped empty frame or an empty list against real ones. On pandas 2.3 that raises `FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated`, which becomes an error under `-W error`. On pandas 3 it quietly changes dtypes, e.g. a datetime `day` column becomes text. Fix: seed each list with a typed empty slice, `no_files = frame[[cols]].iloc[:0]; missing = [no_files]`. The concat then always has the right schema, and an 'only append if non-empty' guard is no longer needed.
