title: How can I name a variable inside a class based on string value passed into its __init__ method?
body: <pre><code>class MyClass:
        __init__(self, some_string):
               self.some_string = anything
  </code></pre>
  
  <p>So similar to the DataFrame class of pandas where the columns can be referenced by appending the name of the column after the dot operator.</p>
  
  <p>Like:</p>
  
  <p>df.column_name_of_some_column</p>
  
  <p>But the column name is a string value when read in from a CSV, for example. Hence the DataFrame classed has someway to create a variable from a string value.</p>
  
  <p>How does it do that?</p>