You have a couple options here. You can read the csv directly into ESP using a file/socket connector or adapter. This example shows how to configure a csv connector in ESP Studio: CSV Connector with ESP Studio
If you are modeling in the XML layer then the csv connector would look something like this:
<connectors>
<connector name="New_Connector_1" class="fs">
<properties>
<property name="type"><![CDATA[pub]]></property>
<property name="fsname"><![CDATA[trades1M.csv]]></property>
<property name="fstype"><![CDATA[csv]]></property>
<property name="transactional"><![CDATA[true]]></property>
<property name="blocksize"><![CDATA[1]]></property>
<property name="dateformat"><![CDATA[%Y-%m-%d %H:%M:%S]]></property>
</properties>
</connector>
Additionally, you can open a socket and write to the socket from the Python program and have ESP listen to that socket. You would do this by defining fsname to be the address of the socket to listen to (for example, localhost:40000).
Finally, there is a Python publish/subscribe API with ESP 4.1 This would allow you to publish to ESP directly from the python program. I've attached a sample program to help you get started 🙂