title: counting colums in csv file with python
body: <p><a href="https://i.stack.imgur.com/Le696.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Le696.png" alt="https://i.stack.imgur.com/Le696.png" /></a></p>
  <p>I want to count email accounts of male and female separately the code I wrote is not working properly so can anyone help me with this, please
  here is my code thank you in advance</p>
  <pre class="lang-py prettyprint-override"><code>    import csv
  
  mailAcc = {}
  femailAcc = {}
  
  with open('1000 Records.csv', 'r') as csv_file:
      csv_reader = csv.reader(csv_file)
      for i in csv_reader:
          email = i[6]
          gender = i[5]
          doman = email.split('@')[-1]
          if doman in mailAcc:
              if gender == 'm':
                   mailAcc[doman] = mailAcc[doman] + 1
          else:
              mailAcc[doman] = 1
  
          if doman in femailAcc:
              if gender == 'F':
                  femailAcc[doman] = femailAcc[doman] + 1
          else:
              femailAcc[doman] = 1
              
      print('Mail Email accounts: ', mailAcc)
      print('Femail Email Accounts: ', femailAcc)
  </code></pre>