Understanding CSV Files

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is Gary with macmost.com let's take a look at CSV files [Music] macmost is brought to you thanks to a great group of more than a thousand supporters go to macmost.com patreon there you could read more about the patreon campaign join us and get exclusive content and course discounts so CSV stands for comma separated values CSV files are a way to store data in a very simple format they're basically plain text files that contain a spreadsheet each row of the text file is a separate Row in the spreadsheet each column is separated by a comma thus comma separated values the advantage to a CSV file is it's not proprietary it's not a Microsoft Excel file that can only be opened in Excel or an Apple Numbers file that could be only opened in numbers it's a very basic format that could be opened in either of those two apps or other spreadsheets like Google Sheets so when a website wants to provide some data in a very basic format that doesn't rely on the other person having a particular app a CSV file is a great way to do that here is a sample CSV file if I were to control click on it and open with text edit you could see how it's a very simple looking file there's just each row here with commas for each column now your Mac is smart enough to know that if you quick look at CSV file then it comes up in a little table here so you can see the data in it it's not going to just show you the plain text yet you can edit the text in a text editor so if I open it in text edit and say change this value right here and save it now if I use quick look you can see that new value is there furthermore the default app for opening up a CSV file should be numbers if you double click then it should open it up and you see it as a number spreadsheet with the data from the CSV file in a single table if numbers isn't what you get when you double click a CSV file you can always select the file choose file and then get info low and then go to open with and then you can change which app is used to open that file or if you select an app you can click the change all button there and it will change it so that any CSV file that you double click on will open in that app so as I mentioned before you can open with numbers and that's probably the default app but you can also open in any other spreadsheet app I don't think there are any spreadsheet apps out there that wouldn't open a CSV file so for instance I can open this in Microsoft Excel and you can see how it works just as well here creating a CSV file from scratch is easy to do you can just open up a text editor like textedit make sure you're in text editing mode so for instance if you see make plain text here switch to that in this case I'm already in plain text mode I can type in some information like this as long as I keep track of the commas to make sure all of the columns will work out I could save this file and then instead of saving with a DOT txt extension use dot CSV and Save now when I double click on this it will open up in numbers and there's my data likewise when you download data from a website it almost always gives you a CSV option so here I am at the US Census Bureau site and I want to download some data notice that I've got various options here one of them is CSV and if I click here to download CSV I can download this file here it is I can use quick look to preview it I can double click and it will open up in numbers note that if I take a look at this file in textedit you can see it's a bit more complex than our simple examples from before one of the things you'll notice is the use of quotes so quotes are used around any data so when you have an open quote you can include any text you want and then a closed quote and then you would have a comma before the next value to be safe A lot of CSV documents will just put every value in quotes even if it's just a plain number it doesn't need it but you can see here an example of how commas are used inside the value so if it wasn't for the quotes on either end it would process this as three separate numbers instead of one large number in addition you can export from numbers or any spreadsheet app as a CSV file so you can go here to file export 2 and one of the options is CSV and I can save this out I'll save it calling it example two and if I open this with text edit you can see the resulting data it's just a plain text file and can now be opened in Excel imported it into Google Sheets or in any other spreadsheet app so if you use CSV files I hope this gives you some background to be able to use them more effectively thanks for watching [Music] if you like this video click the Thumbs Up Button below to let me know I publish new tutorials each weekday hit the Subscribe button so you don't miss out
Info
Channel: macmostvideo
Views: 37,481
Rating: undefined out of 5
Keywords: csv files, comma separated values, comma-separated values, what is csv file?, csv files explained
Id: UofTplCVkYI
Channel Id: undefined
Length: 5min 21sec (321 seconds)
Published: Mon Apr 10 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.