This is how you should do it. First, enable formatter markers in comments in Preferences following;
Preferences -> Code Style -> Formatter Control -> Tick Enable formatter markers in comments
Then place your formatter markers as, for example;
# @formatter:off
df = pd.DataFrame({'height': height, 'weight': weight}, columns=['height', 'weight'])
df.plot.scatter(x='height', y='weight')
#@formatter:on
Note the usage of #
for line comments.
Your comment markers seem to be incorrect in python source code by the way. I tried this on PyCharm 2018.3.4 (Community Edition) and works fine.
Further reference: https://www.jetbrains.com/help/pycharm/settings-code-style.html#formatter_options
Hope this helps.