code: def binary_fraction(self,query='mass_A >= 0'):
          
          subdf = self.stars.query(query)
          nbinaries = (subdf['mass_B'] > 0).sum()
          frac = nbinaries/len(subdf)
          return frac, frac/np.sqrt(nbinaries)
docs: Binary fraction of stars passing given query
  
          :param query:
              Query to pass to stars ``DataFrame``.