Created
December 30, 2020 01:48
-
-
Save korakot/04920d0b7bb31fcdf8f4f0b0a9fa3330 to your computer and use it in GitHub Desktop.
Create pandas dataframe from string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from io import StringIO | |
data = StringIO(''' | |
symbol,quan,v0 | |
ONE-UGERMF, 71472.71, 21.9749 | |
ONE-UGG-ASSF, 5593.87, 35.7534 | |
1SG-LTF-T, 11523.57, 31.9562 | |
'''.strip()) | |
df = pd.read_csv(data, index_col=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment