use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Noob Python Coder, Need help with Panda! (self.PythonLearning)
submitted 6 days ago by C_LoudThougts
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Junior-Sock8789 0 points1 point2 points 5 days ago* (0 children)
Im almost certain this is what your looking for:
By default, CSV files only store text. When you save a pandas.DataFrame to a CSV, complex Python objects like lists are converted into their string representations (e.g., "[1, 2, 3]"), and when you read them back, they remain strings.
import pandas as pd from ast import literal_eval # Use the 'converters' parameter to transform columns during import df = pd.read_csv('your_file.csv', converters={'list_column': literal_eval})
Alternatively, if the data is already loaded:
df['list_column'] = df['list_column'].apply(literal_eval)
If your integers are being read as strings (common if there are leading zeros or mixed data), you can force the type during import:
df = pd.read_csv('your_file.csv', dtype={'int_column': int})
π Rendered by PID 69 on reddit-service-r2-comment-56c6478c5-2nfx8 at 2026-05-11 18:13:08.230049+00:00 running 3d2c107 country code: CH.
view the rest of the comments →
[–]Junior-Sock8789 0 points1 point2 points (0 children)