def create_layer(self, df, title):
    print('Creating New Hosted Feature Layer: {}'.format(title))
    if (self.pub_gis_conn == None):
        new_layer = df.to_featurelayer(title, gis=self.gis_conn)
    else:
        new_layer = df.to_featurelayer(title, gis=self.pub_gis_conn)
    return new_layer.id
def create_layer(self, df, title):
    print('Creating New Hosted Feature Layer: {}'.format(title))
    if (self.pub_gis_conn == None):
        new_layer = df.to_featurelayer(title, gis=self.gis_conn)
    else:
        new_layer = df.to_featurelayer(title, gis=self.pub_gis_conn)
    return new_layer.id