I am able to generate *.dat file:
vikas@server:~/memory_profiler-0.36$ ./mprof run --python test_sl.py
vikas@server:~/memory_profiler-0.36$ ls *.dat
mprofil
It seems matplotlib: 3.0.1 does not go well with python 3.7 in conda environment. df.plot() command could not be executed properly showing "ImportError: matplotlib is required for plotting" but actually matplotlib is installed.
I tried to downgrade matplotlib to 3.0.0 then everything is fine.
conda install -n [your_conda_envionment] matplotlib==3.0.0