# Importing csv through machine learning

**URL:** <https://discuss.elastic.co/t/importing-csv-through-machine-learning/235439>\
**Category:** Elasticsearch\
**Created:** [June 3, 2020, 1:41am UTC](https://discuss.elastic.co/t/importing-csv-through-machine-learning/235439 "2020-06-03T01:41:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumar\_k](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar_k/32/50877_2.png) [@kumar\_k](https://discuss.elastic.co/u/kumar_k)\
**Post date:** [June 3, 2020, 1:41am UTC](https://discuss.elastic.co/t/importing-csv-through-machine-learning/235439/1 "2020-06-03T01:41:05Z")

</div>

Hi,

I have a csv with two columns. one having date in the format  
2019/04/30 Tuesday 08:00:00 and second column a float value

So i have created mappings like below:  
'''  
PUT /lt\_ts1  
{  
"mappings": {  
"properties": {  
"rec\_date": {  
"type": "date",  
"format": "yyyy/MM/dd EEEE HH:mm:ss"},  
"Load in kW": { "type": "float"}  
}  
}  
}  
'''  
here lt\_ts1 is the index name.

Now how should i bind these mappings to the csv file through machine learning. I have chosen machine learning ecause in python client i am not able to create a elasticsearch object since the converting the string to above date format is not available.

---

<div class="post-metadata">

**Author:** ![kumar\_k](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar_k/32/50877_2.png) [@kumar\_k](https://discuss.elastic.co/u/kumar_k)\
**Post date:** [June 3, 2020, 1:48am UTC](https://discuss.elastic.co/t/importing-csv-through-machine-learning/235439/2 "2020-06-03T01:48:48Z")

</div>

After I executed PUT I could see "lt\_ts1" index in the Elasticsearch Index Management but in the Kibana Index patterns and in the Visualiations it is not shown.

Please guide me

---

<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:** [July 1, 2020, 1:48am UTC](https://discuss.elastic.co/t/importing-csv-through-machine-learning/235439/3 "2020-07-01T01:48:51Z")

</div>

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