title: Please explain the mistake I am making in the piece of code?
body: <p>Please refer to the code below:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import math
  
  class ElNinoData(object):
      # Your implementation here 
      # class variables
      add = 0
      count = 0
      average = 0
  
      # class methods
      def __init__(self , object):
          self.object = object
  
      def get_humidity():
          return self.object['humidity']
  
      def conversion():
          self.object = self.object.astype({'zon_winds':'float64','mer_winds':'float64','humidity':'float64','air_temp':'float64','s_s_temp':'float64'})
          return self.object
  
      def replace_null():
          if not math.isnan(self.object['humidity']):
              global add
              global count
              global average
  
              add += pd.to_numeric(self.object['humidity'])
              count += 1
              average = add / count
          else:
              self.object['humidity'] = average
          return self.object['humidity']
  
  def get_obj_it():
      lst = ['bouy','day','latitude','longitude','zon_winds','mer_winds','humidity','air_temp','s_s_temp']
      df = pd.read_csv('C:\\Users\\suel.abbasi\\Downloads\\elnino.gz', sep='\s+', header=None)
      df.columns = lst
      df = df.replace({'.':np.nan})
  
      for i , j in df.iterrows():        
          yield ElNinoData(j)
  
  
  def average_humidity():    
      e_n_generator = get_obj_it()
  
      count = 0;
      hum_sum = 0;
  
      for e_n_row in e_n_generator:
          e_n_row = e_n_row.conversion()
          count += 1
          hum_sum += e_n_row.get_humidity()
  
      print("Mean Humidity is '{}' Percent".format(hum_sum/count))
  average_humidity()
  </code></pre>
  
  <p>The code keeps throwing an error, I cant understand the error. I am trying to implement a class to programatically represent the data entries.</p>
  
  <h2>The error is below is:</h2>
  
  <p><strong><em>TypeError: conversion() takes 0 positional arguments but 1 was</em></strong> </p>