I connected to a sftp and got a list of files successfully:
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy( paramiko.AutoAddPolicy() )
ssh.connect(Hostname, username=Username, password=Password)
ftp = ssh.open_sftp()
files = ftp.listdir()
dir_oi = "blah"
foi = ftp.listdir(dir_oi)
foi = [i for i in foi if '.csv' in i]
foi = [i for i in foi if not '.test.' in i]
len(foi)
and I get a list of 500+ csvs. I would like to read them to process, but am hitting a block.
remote_file = ( dir_oi +"/" + foi[0])
I tried pd.read_csv(remote_file)
and other parimiko suggestions from SO to no avail.
Any suggestions?