Skip to content

Not working code #234

@anakreonod

Description

@anakreonod

Hello.
Why doesn't the code part work for the same logging data?
TypeErrorTraceback (most recent call last)
in ()
12 return labels[row['Lith_Section']-1]
13
---> 14 training_data.loc[:,'FaciesLabels'] = training_data.apply(lambda row: label_facies(row, facies_labels), axis=1)
15 training_data.describe()

5 frames
in label_facies(row, labels)
10
11 def label_facies(row, labels):
---> 12 return labels[row['Lith_Section']-1]
13
14 training_data.loc[:,'FaciesLabels'] = training_data.apply(lambda row: label_facies(row, facies_labels), axis=1)

TypeError: ('list indices must be integers, not float', u'occurred at index 0')

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions