Created
October 6, 2020 16:09
-
-
Save patharanordev/f68886d1007938bfe49e460129c477de to your computer and use it in GitHub Desktop.
Write DataFrame from pandas to CSV file
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
production_fname = '{}/production.csv'.format(os.getcwd()) | |
def write_prodfile(production_df): | |
if os.path.isfile(production_fname): | |
# Remove if exists | |
os.remove(production_fname) | |
production_df.to_csv(r'{}'.format(production_fname), index = False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment