I need to store the files in STFP client to pandas dataframe to better process it. I am new to paramiko, could someone please help me with this? Thank you!
Below is my code:
df1 = pd.Dataframe
sftp = paramiko.SFTPClient.from_transport(transport)
remote_path = "/ppreports/outgoing/"
localdir = 'D:\work\paypal_SFTP'
# list all reports
reports = sftp.listdir(remote_path)
## Everything works fine here, I am able to get all files in this direc
### now I wanted to open this filename1.CSV
with sftp.open('filename1.CSV', "w") as f:
df1 = pd.read_csv(sftp.open(remote_path))
### and now it gives "OSError: General failure"
#the get step works fine too
sftp.get(remote_path, localdir)