python - How can I write this syntax if there is space in column name? -
how can write syntax if there space in column name "image_path"? instead of "image_path", have "image path". changed column name works. however, wondering if there way can write syntax without changing column name "image path" "image_path".
(df.groupby('content_type').image_path.nunique()) thank you, shone
edit: in case answer below deleted:
df.groupby('content_type')['image path'].nunique()
use [...] indexer string:
df.groupby('content_type')['image path'].nunique()
Comments
Post a Comment