This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import os | |
if __name__ == '__main__': | |
"""This script will merge two CSV with common data as per the ID as a field | |
into new CSV. | |
::NOTE:: This program tested on 2.7.6 version of python. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INPUT1 | |
====== | |
ID,name,add | |
1,anupam,FHG | |
2,aditya,DFR | |
3,urmila,HJTY | |
4,roop,GHG | |
5,EASH,HJJ | |
INPUT2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lxml import etree | |
data = open('D:\Conversion\MACSXML_Parts.xslt') | |
xslt_content = data.read() | |
xslt_root = etree.XML(xslt_content) | |
dom = etree.parse('D:\Conversion\Cat2015UF.xml') | |
transform = etree.XSLT(xslt_root) | |
result = transform(dom) | |
f = open('D:\Conversion\MACSXML_Parts.csv', 'w') | |
f.write(str(result1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE localhost:9200/test-idx | |
echo | |
curl -XPUT localhost:9200/test-idx -d '{ | |
"settings": { | |
"index": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0, | |
"analysis": { | |
"analyzer": { | |
"query_default": { |