# Geo points for ingestion of data in csv format using python

**URL:** <https://discuss.elastic.co/t/geo-points-for-ingestion-of-data-in-csv-format-using-python/226664>\
**Category:** Elasticsearch\
**Created:** [April 6, 2020, 9:28am UTC](https://discuss.elastic.co/t/geo-points-for-ingestion-of-data-in-csv-format-using-python/226664 "2020-04-06T09:28:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![richylyq](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@richylyq](https://discuss.elastic.co/u/richylyq)\
**Post date:** [April 6, 2020, 9:28am UTC](https://discuss.elastic.co/t/geo-points-for-ingestion-of-data-in-csv-format-using-python/226664/1 "2020-04-06T09:28:32Z")

</div>

Hi, I wish to ingest my csv files which consist of fields with latitude and longitude values. How can i ingest these two values as geo\_points using python?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 6, 2020, 3:05pm UTC](https://discuss.elastic.co/t/geo-points-for-ingestion-of-data-in-csv-format-using-python/226664/2 "2020-04-06T15:05:42Z")

</div>

You need to write a script which reads every line of the CSV file, convert it to json document, add the json to a bulk request and from time to time send the bulk request to elasticsearch.  
Before that, you need to define the mapping for your index.

Otherwise, you can also read [https://www.elastic.co/blog/importing-csv-and-log-data-into-elasticsearch-with-file-data-visualizer](https://www.elastic.co/blog/importing-csv-and-log-data-into-elasticsearch-with-file-data-visualizer)

Or use [https://www.elastic.co/guide/en/elasticsearch/reference/7.6/csv-processor.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/csv-processor.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 4, 2020, 3:05pm UTC](https://discuss.elastic.co/t/geo-points-for-ingestion-of-data-in-csv-format-using-python/226664/3 "2020-05-04T15:05:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
