Open oogl opened 3 years ago
f-strings are more convenient for reading the code in the majority of cases. They are also speed-optimized. Exceptions: backslashes may not appear inside the expression portions of f-strings.
f-strings
Examples:
This line will change from
print("Last compilation:", str(datetime.datetime.now()))
to
print(f'Last compilation: {datetime.datetime.now()}')
This one from
self.dataframe[str(column) + '_dtf'] = pd.to_datetime(self.dataframe[column])
self.dataframe[f'{column}_dtf'] = pd.to_datetime(self.dataframe[column])
and so on.
f-strings
are more convenient for reading the code in the majority of cases. They are also speed-optimized. Exceptions: backslashes may not appear inside the expression portions of f-strings.Examples:
This line will change from
to
This one from
to
and so on.