0
I have a student database with a Ticket Date column in the dd/mm/aa format. I need to generate an Ano_ticket column only with the year of the date of each record.
import pandas as pd
df = pd.read_csv('alunos.csv', sep='|')
data = df['DT_INGRESSO']
data.str.split('/')
ano = data[2]
I tried something with str.split(), which separates day, month and year into a list, but I couldn’t think of a way to do that for all the records. I’m a beginner in Python.
I believe you did not understand how pandas works, https://paulovasconcellos.com.br/28-commanderss-%C3%Pandas-pouches-that-maybe-you%C3%AA-n%C3%A3o-conhe%C3%A7a-6ab64beefa93
– FourZeroFive
I’m a Python beginner in general. Any help is welcome
– Matheus Macedo