sashahafner / pystupid

Some notes on Python syntax and more
GNU General Public License v3.0
2 stars 0 forks source link

Brilliant, clear use of square brackets #16

Open sashahafner opened 7 months ago

sashahafner commented 7 months ago

Check out this example:

summ = pd.DataFrame(data = np.unique(dat['reactor']), columns = ['reactor'])

First use of [ ] is indexing, second is creating a list. How stupid.