My pandas version was 0.23.4 but as I needed to use the explode function, I upgraded using
!pip3 install --upgrade pandas==0.25.0 Output shows: Successfully