AssertionError: The field name is not available in the data. Choose from: (‘a’,’b’)が発生した件

使用環境

mac
python=3.9
geopandas

 

やりたかったこと

 

  1. geopandasを使用してgeojsonを読み込み
  2. そのデータを分析をしたかった

 

その際、以下のエラーが発生

AssertionError: The field name is not available in the data. Choose from: ('a','b')

 

解決

上記のエラーを直訳すると以下のようになる。

AssertionError: データでフィールド名を使用できません。以下から選んでくれよ('a','b')

geopandasの状況的には、そんな列名ないよ!!こっから選んでよ!!」って感じ。

 

確かに列名に無い列を参照しようとしていたのが原因だった。