Index creation in Elastic Search using Python in 5.4 Version

I am not able to create index in Elastic Search for version 5.4.

Same code i am able to do it for 7.8 Version

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

Here you need in old versions to add the type name in the mapping.
But you should not use a version which is not maintained anymore and use 7.9 instead.