1

I want to combine 3 columns with dollar signs,

import pandas as pd
import numpy as np
df = pd.DataFrame({"a":["$car"], "b": ["$food"],"c":[np.nan]})

sample data

df['combine'] = df['a'].fillna('') + ' ' + df['b'].fillna('') + ' ' + df['c'].fillna('')

my code give me italic result result

my expected result is enter image description here

I knew that's an interpretation issue in jupyter notebook/python, please advise on it.

PyBoss
  • 599
  • 1
  • 7
  • 20

1 Answers1

2

This is being caused because of the MathJax rendering it.

When you launch the ipython notebook, run it without mathjax using

ipython notebook --no-mathjax

usernamenotfound
  • 1,540
  • 2
  • 11
  • 18
  • can you please advise how to configure it in Jupyter Notebook, I'm currently using this. – PyBoss Nov 14 '18 at 00:57
  • 2
    Execute `jupyter notebook --no-mathjax` – usernamenotfound Nov 14 '18 at 00:58
  • if I want to schedule the .py script to run in Task Scheduler, how to configure 'jupyter notebook --no-mathjax' into the python.exe while launching. reference https://stackoverflow.com/questions/44727232/scheduling-a-py-file-on-task-scheduler-in-windows-10 – PyBoss Nov 15 '18 at 23:33