I am looking for a neat solution to read data (using either read_csv or read_sas) to a Pandas Dataframe from a secure FTP server in Python 3. All the examples I can find are many lines and some for Python 2. Isn't there a neat way to insert your username+password to Pandas read_csv-like method together with an ftp url and folder?
pandas.read_csv() accepts a file-like object.  Paramiko is a library which handles SFTP and can provide file-like objects. Once you've set up the connection, it's simple as:
with sftp.open("file.csv") as f:
    pd.read_csv(f)
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With