transtab
transtab copied to clipboard
NameError: free variable 'bin_cols' referenced before assignment in enclosing scope
NameError: free variable 'bin_cols' referenced before assignment in enclosing scope What should I do?
@Travisma2233 Hello, Were you able to solve this?
did you meet this error when you use load_data function ?
The reason is that the bin_cols variable is first declared inside the if statement, but is used again outside the if statement. This is a feature of Python variables. You can just declare bin_cols = [] before the if statement.