DOC: to_markdown should not accept `str` for `buf` argument
Hello maintainer,

Is there's not an error in documentation for "to_markdown" function at:

https://github.com/pandas-dev/pandas/blob/73c68257545b5f8530b7044f56647bd2db92e2ba/pandas/core/frame.py#L2550

The documentation indicate to be able to take a str in argument (Path), but when tested, it crash with:

```
pd.DataFrame(data).to_markdown(args.output_file, index=False)
  File "venv/lib/python3.6/site-packages/pandas/core/frame.py", line 2267, in to_markdown
    buf.writelines(result)
AttributeError: 'str' object has no attribute 'writelines'
```

In https://pandas.pydata.org/pandas-docs/version/1.0.1/reference/api/pandas.DataFrame.to_markdown.html
the documentation do not have mention of the "str" option.

Version of pandas: 1.1.5
Version of python: 3.6.9

That's all, have a nice day ;)

Regards