I've run into this weird error and I'm wondering whether anyone has a clue what's going on.
I'm trying to print the minimal date from a date column in Pandas series. However, the following is raising an invalid syntax error:
print(f'{df_raw['POSTING_DATE'].min()}')
This does work, though:
min_date = df_raw['POSTING_DATE'].min()
print(f'{min_date}')
Using .format()
also works. Obviously I can use a workaround here but I was just wondering why the f-string syntax doesn't work in this case. I thought the f-strings should be able to handle similar expressions.
I'm using Python 3.6.9.