I'm curious if arcpy methods that take as input a CSV or text file can accept a file-like object instead, so I don't have to write to disk before invoking.
For example, if I have a dataframe df:
import pandas as pd
from io import StringIO
import arcpy
s_buff = StringIO()
df.to_csv(s_buff)
arcpy.management.BearingDistanceToLine(s_buff, "memory\\output", "x", 'y', 'd', bearing_field="b")
This generates an error: Error in executing tool. s_buff.read(), s_buff.seek(0) also generates errors. I know I could write to a temporary file, but I'd rather not.