Hi I am struggling with finding the max and min of date column in my dataset.
Below is my dataset:
customer_final['tran_date']
0       2014-02-28
1       2014-02-27
2       2014-02-24
3       2014-02-24
4       2014-02-23
           ...    
23048   2011-01-25
23049   2011-01-25
23050   2011-01-25
23051   2011-01-25
23052   2011-01-25
As clearly we can see in the dataset we have data between 2011-01-25 to 2014-02-28.
But executing the below-mentioned code is giving me the wrong output.
print(customer_final['tran_date'].max())
print(customer_final['tran_date'].min())
2014-12-02 00:00:00
2011-01-02 00:00:00
Any help would be highly appreciated.
Edit: Posting raw data.
transaction_id  cust_id tran_date   prod_subcat_code    prod_cat_code   Qty Rate    Tax total_amt   Store_type
0   80712190438 270351  28-02-2014  1   1   -5  -772    405.300 -4265.300   e-Shop
1   29258453508 270384  27-02-2014  5   3   -5  -1497   785.925 -8270.925   e-Shop
2   51750724947 273420  24-02-2014  6   5   -2  -791    166.110 -1748.110   TeleShop
3   93274880719 271509  24-02-2014  11  6   -3  -1363   429.345 -4518.345   e-Shop
4   51750724947 273420  23-02-2014  6   5   -2  -791    166.110 -1748.110   TeleShop
... ... ... ... ... ... ... ... ... ... ...
23048   94340757522 274550  25-01-2011  12  5   1   1264    132.720 1396.720    e-Shop
23049   89780862956 270022  25-01-2011  4   1   1   677 71.085  748.085 e-Shop
23050   85115299378 271020  25-01-2011  2   6   4   1052    441.840 4649.840    MBR
23051   72870271171 270911  25-01-2011  11  5   3   1142    359.730 3785.730    TeleShop
23052   77960931771 271961  25-01-2011  11  5   1   447 46.935  493.935 TeleShop
Edit 2: Datatypes of all the columns in the DF.
transaction_id               int64
cust_id                      int64
tran_date           datetime64[ns]
prod_subcat_code             int64
prod_cat_code                int64
Qty                          int64
Rate                         int64
Tax                        float64
total_amt                  float64
Store_type                  object
Unnamed: 10                 object
dtype: object
 
     
    