##  Step 2: Convert a CSV File into LDIF Format
Once you've prepared a CSV file, convert it into LDIF format that the Integration API can process. The script in this tutorial uses the pandas library, a Python tool for data analysis and manipulation.
The following script converts and maps data into LDIF format and returns an output JSON file named output.json.
Example script:

```
import pandas as pd
import json

df = pd.read_csv("LeanIX_Resources_Import_template.csv")

excelData = []

for index, row in df.iterrows():
    excelData.append({
        "type": row['type'],
        "id": row['id'],
        "data": {
            'name': row['name'],
            'url': row['url']
        }
    })

ldif = {
        "connectorType": "leanix",
        "connectorId": "leanix-pandasCSV",
        "connectorVersion": "1.0.0",
        "processingDirection": "inbound",
        "processingMode": "partial",
        "lxVersion": "1.0.0",
        "description": "LDIF Generated by PANDAS CSV data",
        "content": excelData}

print ("Writing output to output.json")
f = open("output.json", "w")
f.write(json.dumps(ldif, indent=2))
f.close()
print ("Done")
```



Example output:

```
{
   "connectorType": "leanix",
   "connectorId": "leanix-pandasCSV",
   "connectorVersion": "1.0.0",
   "processingDirection": "inbound",
   "processingMode": "partial",
   "lxVersion": "1.0.0",
   "description": "LDIF Generated by PANDAS CSV data",
   "content": [
      {
         "type": "Application",
         "id": "28fe4aa2-6e46-41a1-....-72afb3acf256",
         "data": {
            "name": "Technical documentation",
            "url": "https://docs.example.net/"
         }
      },
      {
         "type": "Application",
         "id": "2efa37b5-18aa-48d8-....-1328c0d856d7",
         "data": {
            "name": "Vendor's website",
            "url": "https://www.example-vendor.net/"
         }
      }
   ]
}
```



