Last active
July 20, 2020 03:01
-
-
Save FernandoCelmer/ed6985fa2e5e812d6794faa6b6f6d71c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from pathlib import Path | |
class ExportCSV: | |
def __init__(self, user): | |
mypath = Path().absolute() | |
df = pd.DataFrame(user, columns= ['User', 'E-mail']) | |
df.to_csv (str(mypath) + r'\export_dataframe.csv', index = False, header=True, sep=';') | |
print(df) | |
if __name__ == "__main__": | |
user = {'User': ['User_01','User_02','User_03','User_04','User_05'], | |
'E-mail': ['user@gmail.com','user@gmail.com','user@gmail.com','user@gmail.com','user@gmail.com'] | |
} | |
ExportCSV(user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment