I am editing a CSV file in Python, I have deleted some columns, created an index and filtered. But I have not been able to extract the numerical part of the columas. How can I extract only the numerical information from the columns?
Extract only the numeric part of the column data. example:
MarketTime = 11: 18: 26.549
The whole column should be like this:
11: 18: 26,549
import pandas as pd
df = pd.read_csv('C:/Users/TECNOLOGIA/datos.csv',names=['LocalTime', 'Message', 'MarketTime', 'Symbol', 'Type', 'Price', 'Size', 'Source','Condition','Tick','Mmid','SubMarketId','Date'], usecols=['Type','MarketTime','Price'],index_col='Type') df=(df.loc['Type=0']) print (df)