Please [add](https://stackoverflow.com/posts/71454709/edit) your code together with test data as text, never as image. If you put your code between triple backticks and add a Python tag, (so ```python, on a separate line) the code will be colored automatically.
– JohanCMar 13 '22 at 11:43
Note that to get the first 10 characters of `str(x)`, you can use `str(x)[:10]`.
– JohanCMar 13 '22 at 11:43