Skip to content

Commit 2ed645f

Browse files
committed
mention .str.replace() and to_numeric() for conversion
1 parent 002cf01 commit 2ed645f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

assignments.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ For this course, it's recommended that you try doing the work yourself, asking t
101101
- **`SettingWithCopyWarning`:** [How to fix](https://www.dataquest.io/blog/settingwithcopywarning/)
102102
- **`input()` stuck:** Jupyter can be a bit buggy when dealing with interactive input. If it seems to get stuck or you aren't seeing a prompt when you'd expect one, try clicking the `Runtime` menu then `Restart Kernel`.
103103
- **In a visualization, the values are out of order along the axis, or you're seeing vertical/zig-zag-y lines:** Make sure that:
104-
- The values are integers/floats/[timestamps](https://plotly.com/python/line-charts/#line-plots-on-date-axes), not strings, where applicable.
105-
- See the [`thousands` argument for `read_csv()`](https://pandas.pydata.org/docs/user_guide/io.html#thousand-separators).
104+
- The values are integers/floats/[timestamps](https://plotly.com/python/line-charts/#line-plots-on-date-axes), not strings, where applicable. To convert, see:
105+
- The [`thousands` argument for `read_csv()`](https://pandas.pydata.org/docs/user_guide/io.html#thousand-separators)
106+
- [`.str.replace()`](https://pandas.pydata.org/docs/reference/api/pandas.Series.str.replace.html)
107+
- [`to_numeric()`](https://pandas.pydata.org/docs/reference/api/pandas.to_numeric.html)
106108
- [Line charts: The column used for the X axis is sorted.](https://plotly.com/python/line-charts/#data-order-in-line-charts)
107109
- [**`AttributeError: partially initialized module 'orjson' has no attribute 'OPT_NON_STR_KEYS'`:**](https://github.com/plotly/plotly.py/issues/3567) Add the following cell before your other Plotly code, then `Restart session and run all`.
108110

0 commit comments

Comments
 (0)