{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/19824","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/19824/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/19824/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/19824/events","html_url":"https://github.com/pandas-dev/pandas/issues/19824","id":299111131,"number":19824,"title":"Provide styling option to escape dollar signs","user":{"login":"davidchall","id":1804856,"avatar_url":"https://avatars1.githubusercontent.com/u/1804856?v=4","gravatar_id":"","url":"https://api.github.com/users/davidchall","html_url":"https://github.com/davidchall","followers_url":"https://api.github.com/users/davidchall/followers","following_url":"https://api.github.com/users/davidchall/following{/other_user}","gists_url":"https://api.github.com/users/davidchall/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchall/subscriptions","organizations_url":"https://api.github.com/users/davidchall/orgs","repos_url":"https://api.github.com/users/davidchall/repos","events_url":"https://api.github.com/users/davidchall/events{/privacy}","received_events_url":"https://api.github.com/users/davidchall/received_events","type":"User","site_admin":false},"labels":[{"id":76812,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement","name":"Enhancement","color":"4E9A06","default":false},{"id":2413328,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Visualization","name":"Visualization","color":"8AE234","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-21T20:10:13Z","updated_at":"2018-02-23T09:06:43Z","closed_at":null,"author_association":"NONE","body":"Jupyter Notebooks use MathJax to render text between dollar signs. Sometimes this is appropriate and sometimes it is not.\r\n\r\n```python\r\nimport pandas as pd\r\ndf=pd.DataFrame({'A':['From $200 million to $700 million','$20+']})\r\ndf\r\n```\r\n<img src=\"https://user-images.githubusercontent.com/1804856/36501664-93cd23f6-16fc-11e8-8f74-47a47b14741d.png\" width=\"200\">\r\n\r\n It appears that the [official guidance](https://github.com/ipython/ipython/issues/3197/) is to use `$\\$$` to render a single `$` symbol.\r\n\r\n```python\r\ndf.A = df.A.str.replace('$', '$\\$$')\r\ndf\r\n```\r\n<img src=\"https://user-images.githubusercontent.com/1804856/36502237-2c8fe2ee-16fe-11e8-8d04-54ecb2407010.png\" width=\"200\">\r\n\r\nHowever, editing the data to tune the rendering is messy. I'm hoping this can be incorporated into the new [Pandas styling module](https://pandas.pydata.org/pandas-docs/stable/style.html). Perhaps something like `df.style.escape_dollar()`.\r\n\r\n#### Output of ``pd.show_versions()``\r\n\r\n<details>\r\n\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 3.6.4.final.0\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 2.6.32-696.13.2.el6.x86_64\r\nmachine: x86_64\r\nprocessor: x86_64\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: en_US.UTF-8\r\nLOCALE: en_US.UTF-8\r\n\r\npandas: 0.22.0\r\npytest: 3.4.0\r\npip: 9.0.1\r\nsetuptools: 38.4.0\r\nCython: None\r\nnumpy: 1.14.0\r\nscipy: None\r\npyarrow: 0.8.0\r\nxarray: None\r\nIPython: 6.2.1\r\nsphinx: None\r\npatsy: None\r\ndateutil: 2.6.1\r\npytz: 2017.3\r\nblosc: None\r\nbottleneck: None\r\ntables: None\r\nnumexpr: None\r\nfeather: 0.4.0\r\nmatplotlib: 2.1.2\r\nopenpyxl: None\r\nxlrd: None\r\nxlwt: None\r\nxlsxwriter: None\r\nlxml: None\r\nbs4: None\r\nhtml5lib: 1.0.1\r\nsqlalchemy: None\r\npymysql: None\r\npsycopg2: None\r\njinja2: 2.10\r\ns3fs: None\r\nfastparquet: None\r\npandas_gbq: None\r\npandas_datareader: None\r\n\r\n</details>\r\n"},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/367951227","html_url":"https://github.com/pandas-dev/pandas/issues/19824#issuecomment-367951227","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/19824","id":367951227,"user":{"login":"gfyoung","id":9273653,"avatar_url":"https://avatars0.githubusercontent.com/u/9273653?v=4","gravatar_id":"","url":"https://api.github.com/users/gfyoung","html_url":"https://github.com/gfyoung","followers_url":"https://api.github.com/users/gfyoung/followers","following_url":"https://api.github.com/users/gfyoung/following{/other_user}","gists_url":"https://api.github.com/users/gfyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/gfyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfyoung/subscriptions","organizations_url":"https://api.github.com/users/gfyoung/orgs","repos_url":"https://api.github.com/users/gfyoung/repos","events_url":"https://api.github.com/users/gfyoung/events{/privacy}","received_events_url":"https://api.github.com/users/gfyoung/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T09:06:43Z","updated_at":"2018-02-23T09:06:43Z","author_association":"MEMBER","body":"I would be more aligned with disabling processing on those table rows as a general option.  Handling just the dollar sign case is too overfitted of a solution.\r\n\r\ncc @TomAugspurger : thoughts?"}}
{"actor":{"display_login":"gfyoung"}}