I'm doing some analysis on customers behaviors upon using internet banking versus offline channel.
I have imported excel database into pandas DataFrame
#Read Excel file using pandas
excel_file = 'Analytic.xlsx'
analytic = pd.read_excel(excel_file)
analytic
Result

Problems
The column THANG_COGD and amnd_state contains the number of transaction months and the status of the users whether they have internet banking or not respectively. Anyway, I want to sort the data by the column THANG_COGD that has value 0 and the column amnd_state that has value A and still print out the corresponding table
I can do this in Excel by simple creating a table and use the sort functionality in Excel to do so like shown

As you can see the column THANG_COGD has been sorted as shown (amnd_state as well)
Questions
- How can I do the same thing with
pandas?
P/s: this is a dummy variable so there is no worries for data exploit
df = df.sort_values('THANG_COGD')df = df.sort_values('THANG_COGD')it still shows values bigger than 0. My question is that are there any ways that I can only get the value 0 in my new table?print(df.dtypes)