Importing Data For Datasets Using CSV Files

This is the simplest method of importing any dataset from a CSV file. For this we will be using the Panda, so importing the Pandas library is a must. 

Syntax: pd.read_csv(‘path of the csv file’)

Consider the CSV file we want to import is price.csv.

Python3




import pandas as pd
  
print('Read data...')
  
# enter the complete path of the csv file
df = pd.read_csv('../price.csv',header=0).head(1000
data = df.values


PyBrain – Importing Data For Datasets

In this article, we will learn how to import data for datasets in PyBrain.

Datasets are the data to be given to test, validate and train on networks. The type of dataset to be used depends on the tasks that we are going to do with Machine Learning. The most commonly used datasets that Pybrain supports are SupervisedDataSet and ClassificationDataSet. As their name suggests ClassificationDataSet is used in the classification problems and the SupervisedDataSet for supervised learning tasks.

Similar Reads

Method 1: Importing Data For Datasets Using CSV Files

This is the simplest method of importing any dataset from a CSV file. For this we will be using the Panda, so importing the Pandas library is a must....

Method 2:  Importing Data For DatasetsUsing Sklearn

...