Python SyntaxError: '(' (U+FF08) Invalid Character
In your code, you are using an invalid character '(' (U+FF08), which looks like a left parenthesis but is actually a full-width character. Python only accepts half-width parentheses as valid syntax.
To resolve this issue, you need to replace the character with a half-width parenthesis:
citySalary = data.groupby('city')['average'].mean().sort_values(ascending=False)
This will fix the syntax error in your code.
原文地址: https://www.cveoy.top/t/topic/lR9u 著作权归作者所有。请勿转载和采集!