1

For the following code, what is the colon (:) means?

import pandas as pd
merge: pd.DataFrame = pd.concat([train, dftt, test])
submission: pd.DataFrame = test[['test_id']]
Zero Piraeus
  • 56,143
  • 27
  • 150
  • 160
william007
  • 17,375
  • 25
  • 118
  • 194
  • 4
    A type hint... you're hinting that `merge` should reference a DataFrame object. – cs95 Jan 27 '18 at 11:06
  • This is [PEP-526](https://www.python.org/dev/peps/pep-0526/). – L3viathan Jan 27 '18 at 11:41
  • 1
    Not that I would know, what type hint means. But since I looked it up, I leave [this SO thread as a link](https://stackoverflow.com/a/32558710/8881141). – Mr. T Jan 27 '18 at 11:42

0 Answers0