In Python 3 and pandas I have a dataframe with a column cpf with codes
candidatos_2014.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 26245 entries, 0 to 1063
Data columns (total 7 columns):
uf 26245 non-null object
cargo 26245 non-null object
nome_completo 26245 non-null object
cpf 26245 non-null object
nome_urna 26245 non-null object
partido_eleicao 26245 non-null object
situacao 26245 non-null object
dtypes: object(7)
memory usage: 1.6+ MB
The codes are numbers like these: "00229379273", "84274662268", "09681949153", "53135636534"...
I saved as CSV
candidatos_2014.to_csv('candidatos_2014.csv')
I use Ubuntu and LibreOffice. But when I opened the file the cpf column does not show the leading zeros:
"229379273", "9681949153"
Please, is there a way to save a CSV that keeps zeros to the left in a column that only has numbers?