Questions tagged [dataset]

A dataset is a collection of data, generally represented in tabular form, with columns signifying different variables and rows signify different members of the set. If you are looking for a freely available dataset for any purpose, please consider asking your question on https://opendata.stackexchange.com.

11414 questions
75
votes
11 answers

Convert DataSet to List

Here is my c# code Employee objEmp = new Employee(); List empList = new List(); foreach (DataRow dr in ds.Tables[0].Rows) { empList.Add(new Employee { Name = Convert.ToString(dr["Name"]), Age = Convert.ToInt32(dr["Age"])…
iJade
  • 23,144
  • 56
  • 154
  • 243
72
votes
6 answers

Best practice to check if DataRow contains a certain column

At the moment, when I iterate over the DataRow instances, I do this. foreach(DataRow row in table) return yield new Thingy { Name = row["hazaa"] }; Sooner of later (i.e. sooner), I'll get the table to be missing the column donkey and the poo will…
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
69
votes
13 answers

Large public datasets?

I am looking for some large public datasets, in particular: Large sample web server logs that have been anonymized. Datasets used for database performance benchmarking. Any other links to large public datasets would be appreciated. I already know…
Jason
69
votes
4 answers

DataSet does not support System.Nullable<> in Export

I was trying to generate a Report using Export to Excell, PDF, TextFile. Well I am doing this in MVC. I have a class which I named SPBatch (which is the exact name of my Stored Procedure in my SQL) and it contains the following: public string…
Ms. B
  • 1,073
  • 6
  • 15
  • 26
62
votes
4 answers

How to find out if a column exists in a DataRow?

I am reading an XML file into a DataSet and need to get the data out of the DataSet. Since it is a user-editable config file the fields may or may not be there. To handle missing fields well I'd like to make sure each column in the DataRow exists…
Bryan Anderson
  • 15,969
  • 8
  • 68
  • 83
60
votes
13 answers

Using Kaggle Datasets in Google Colab

Is it possible to use any datasets available via the kaggle API in Google Colab? I see the Kaggle API is used in this Colab notebook, but it's a bit unclear to me what datasets it provides access to.
hdiz
  • 1,141
  • 2
  • 13
  • 27
58
votes
1 answer

dataset vs .data - Difference?

I am reading some values in data attribute fields. I have seen two easy ways to read the data as shown below: var webappData = document.getElementById('web-app-data'), rating = webappData.dataset.rating; OR var effectData = $('.effects-list…
L84
  • 45,514
  • 58
  • 177
  • 257
55
votes
3 answers

Direct method from SQL command text to DataSet

What is the most direct route to get a DataSet if I have a sql command? string sqlCommand = "SELECT * FROM TABLE"; string connectionString = "blahblah"; DataSet = GetDataSet(sqlCommand,connectionString); GetDataSet() { //...? } I started with…
P.Brian.Mackey
  • 43,228
  • 68
  • 238
  • 348
55
votes
6 answers

OleDB & mixed Excel datatypes : missing data

I have an Excel worksheet I want to read into a datatable - all is well except for one particular column in my Excel sheet. The column, 'ProductID', is a mix of values like ########## and n#########. I tried to let OleDB handle everything by itself…
rlb.usa
  • 14,942
  • 16
  • 80
  • 128
55
votes
15 answers

How to test if a DataSet is empty?

I'm modifying someone else's code where a query is performed using the following: DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(sqlString, sqlConn); da.Fill(ds); How can I tell if the DataSet is empty (i.e. no results were…
MCS
  • 22,113
  • 20
  • 62
  • 76
53
votes
4 answers

How do I get a list of built-in data sets in R?

Can someone please help how to get the list of built-in data sets and their dependency packages?
mockash
  • 1,204
  • 5
  • 14
  • 26
51
votes
6 answers

Why is a SQL float different from a C# float

Howdy, I have a DataRow pulled out of a DataTable from a DataSet. I am accessing a column that is defined in SQL as a float datatype. I am trying to assign that value to a local variable (c# float datatype) but am getting an InvalidCastExecption …
Keith Sirmons
  • 8,271
  • 15
  • 52
  • 75
49
votes
2 answers

R mtcars dataset, meaning of "vs" variable?

What does the "vs" variable mean in the "mtcars" dataset in R? The helpfile says it means "V/S" but that is not enlightening. Commands: data(mtcars) head(mtcars) ?mtcars
ddunn801
  • 1,900
  • 1
  • 15
  • 20
46
votes
4 answers

Reading DataSet

How do I read data from a DataSet in WPF? I have a train schedule table with just 2 columns and I want to be able to read the departure times and calculate when the next train is leaving. For example, the time now is 12:29 and my application should…
Matt
  • 511
  • 2
  • 6
  • 4
44
votes
2 answers

How to pass dynamic column names in dplyr into custom function?

I have a dataset with the following structure: Classes ‘tbl_df’ and 'data.frame': 10 obs. of 7 variables: $ GdeName : chr "Aeugst am Albis" "Aeugst am Albis" "Aeugst am Albis" "Aeugst am Albis" ... $ Partei : chr "BDP" "CSP" "CVP" "EDU"…
grssnbchr
  • 2,877
  • 7
  • 37
  • 71