Note
Click here to download the full example code
03. Empty
Example
Out:
'\n# Load data\ndf = pd.read_csv(\'./datasets/format03_data_300.csv\')\n\n# Show\nprint(df)\nprint(df.columns)\nprint(df.dtypes)\nprint(df[\'0\'].isna().sum())\n\n# Convert string to numpy\nprint(df[\'0\'])\n#df[\'0\'] = df[\'0\'].map(np.fromstring)\n\n#print(df[\'0\'])\n\naux = df.loc[0, \'0\']\nprint("aaa")\nprint(aux)\nprint(type(aux))\n\na = np.frombuffer(aux, dtype=np.complex_)\nprint(a)\na = np.fromstring(aux, dtype=np.complex_)\nprint(a)\n'
7 # Libraries
8 import numpy as np
9 import pandas as pd
10
11 """
12 # Load data
13 df = pd.read_csv('./datasets/format03_data_300.csv')
14
15 # Show
16 print(df)
17 print(df.columns)
18 print(df.dtypes)
19 print(df['0'].isna().sum())
20
21 # Convert string to numpy
22 print(df['0'])
23 #df['0'] = df['0'].map(np.fromstring)
24
25 #print(df['0'])
26
27 aux = df.loc[0, '0']
28 print("aaa")
29 print(aux)
30 print(type(aux))
31
32 a = np.frombuffer(aux, dtype=np.complex_)
33 print(a)
34 a = np.fromstring(aux, dtype=np.complex_)
35 print(a)
36 """
Total running time of the script: ( 0 minutes 0.001 seconds)