read specific columns from csv in python pandas
import pandas as pd
df = pd.read_csv('some_data.csv', usecols = ['col1','col2'], low_memory = False)
read specific columns from csv in python pandas
import pandas as pd
df = pd.read_csv('some_data.csv', usecols = ['col1','col2'], low_memory = False)
python extract specific columns from pandas dataframe
# Basic syntax:
new_dataframe = dataframe.filter(['col_name_1', 'col_name_2'])
# Where the new_dataframe will only have the column names specified
# Note, use df.filter(['names', ... ], axis=0] to select rows
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us