Python getting exact cell from csv file
import csv
filename = str(input("Give the file name: "))
file = open(filename, "r")
with file as f:
size = sum(1 for _ in f)
print("File", filename, "has been read, and it has", size, "lines.", size - 1, "rows has been analyzed.")
I pretty much type the csv file path to analyze and do different things with it.
First question is: How can I print the exact cell from the CSV file? I have tried different methods, but I can't seem to get it working.
For example I want to print the info of those two cells
The other question is: Can I automate it to print the very first cell(1 A) and the very last row first cell (1099 A), without me needing to type the cell locations?
Thank you
Small portion of data
Example of the data:
Time Solar Carport Solar Fixed SolarFlatroof Solar Single
1.1.2016 317 1715 6548 2131
2.1.2016 6443 1223 1213 23121
3.1.2016 0 12213 0 122
python csv cell
add a comment |
import csv
filename = str(input("Give the file name: "))
file = open(filename, "r")
with file as f:
size = sum(1 for _ in f)
print("File", filename, "has been read, and it has", size, "lines.", size - 1, "rows has been analyzed.")
I pretty much type the csv file path to analyze and do different things with it.
First question is: How can I print the exact cell from the CSV file? I have tried different methods, but I can't seem to get it working.
For example I want to print the info of those two cells
The other question is: Can I automate it to print the very first cell(1 A) and the very last row first cell (1099 A), without me needing to type the cell locations?
Thank you
Small portion of data
Example of the data:
Time Solar Carport Solar Fixed SolarFlatroof Solar Single
1.1.2016 317 1715 6548 2131
2.1.2016 6443 1223 1213 23121
3.1.2016 0 12213 0 122
python csv cell
3
docs.python.org/3/library/csv.html
– nathan hayfield
Nov 15 '18 at 18:16
3
Are you aware of pandas library? That's well suited for this job. Do you like to explore that?
– pygo
Nov 15 '18 at 18:17
1
pandas.pydata.org/pandas-docs/stable/generated/…
– JeffCharter
Nov 15 '18 at 18:18
Thanks both. I have indeed tried to look at both of those guides, but haven't really found the right loaction where it's explained.
– Daniel
Nov 15 '18 at 18:24
1
Added a download link to the file Added also a small text.
– Daniel
Nov 15 '18 at 18:49
add a comment |
import csv
filename = str(input("Give the file name: "))
file = open(filename, "r")
with file as f:
size = sum(1 for _ in f)
print("File", filename, "has been read, and it has", size, "lines.", size - 1, "rows has been analyzed.")
I pretty much type the csv file path to analyze and do different things with it.
First question is: How can I print the exact cell from the CSV file? I have tried different methods, but I can't seem to get it working.
For example I want to print the info of those two cells
The other question is: Can I automate it to print the very first cell(1 A) and the very last row first cell (1099 A), without me needing to type the cell locations?
Thank you
Small portion of data
Example of the data:
Time Solar Carport Solar Fixed SolarFlatroof Solar Single
1.1.2016 317 1715 6548 2131
2.1.2016 6443 1223 1213 23121
3.1.2016 0 12213 0 122
python csv cell
import csv
filename = str(input("Give the file name: "))
file = open(filename, "r")
with file as f:
size = sum(1 for _ in f)
print("File", filename, "has been read, and it has", size, "lines.", size - 1, "rows has been analyzed.")
I pretty much type the csv file path to analyze and do different things with it.
First question is: How can I print the exact cell from the CSV file? I have tried different methods, but I can't seem to get it working.
For example I want to print the info of those two cells
The other question is: Can I automate it to print the very first cell(1 A) and the very last row first cell (1099 A), without me needing to type the cell locations?
Thank you
Small portion of data
Example of the data:
Time Solar Carport Solar Fixed SolarFlatroof Solar Single
1.1.2016 317 1715 6548 2131
2.1.2016 6443 1223 1213 23121
3.1.2016 0 12213 0 122
python csv cell
python csv cell
edited Nov 17 '18 at 18:42
Daniel
asked Nov 15 '18 at 18:14
Daniel Daniel
235
235
3
docs.python.org/3/library/csv.html
– nathan hayfield
Nov 15 '18 at 18:16
3
Are you aware of pandas library? That's well suited for this job. Do you like to explore that?
– pygo
Nov 15 '18 at 18:17
1
pandas.pydata.org/pandas-docs/stable/generated/…
– JeffCharter
Nov 15 '18 at 18:18
Thanks both. I have indeed tried to look at both of those guides, but haven't really found the right loaction where it's explained.
– Daniel
Nov 15 '18 at 18:24
1
Added a download link to the file Added also a small text.
– Daniel
Nov 15 '18 at 18:49
add a comment |
3
docs.python.org/3/library/csv.html
– nathan hayfield
Nov 15 '18 at 18:16
3
Are you aware of pandas library? That's well suited for this job. Do you like to explore that?
– pygo
Nov 15 '18 at 18:17
1
pandas.pydata.org/pandas-docs/stable/generated/…
– JeffCharter
Nov 15 '18 at 18:18
Thanks both. I have indeed tried to look at both of those guides, but haven't really found the right loaction where it's explained.
– Daniel
Nov 15 '18 at 18:24
1
Added a download link to the file Added also a small text.
– Daniel
Nov 15 '18 at 18:49
3
3
docs.python.org/3/library/csv.html
– nathan hayfield
Nov 15 '18 at 18:16
docs.python.org/3/library/csv.html
– nathan hayfield
Nov 15 '18 at 18:16
3
3
Are you aware of pandas library? That's well suited for this job. Do you like to explore that?
– pygo
Nov 15 '18 at 18:17
Are you aware of pandas library? That's well suited for this job. Do you like to explore that?
– pygo
Nov 15 '18 at 18:17
1
1
pandas.pydata.org/pandas-docs/stable/generated/…
– JeffCharter
Nov 15 '18 at 18:18
pandas.pydata.org/pandas-docs/stable/generated/…
– JeffCharter
Nov 15 '18 at 18:18
Thanks both. I have indeed tried to look at both of those guides, but haven't really found the right loaction where it's explained.
– Daniel
Nov 15 '18 at 18:24
Thanks both. I have indeed tried to look at both of those guides, but haven't really found the right loaction where it's explained.
– Daniel
Nov 15 '18 at 18:24
1
1
Added a download link to the file Added also a small text.
– Daniel
Nov 15 '18 at 18:49
Added a download link to the file Added also a small text.
– Daniel
Nov 15 '18 at 18:49
add a comment |
1 Answer
1
active
oldest
votes
You import csv
at the very top but then decided not to use it. I wonder why – it seems just what you need here. So after a brief peek at the official documentation, I got this:
import csv
data =
with open('../Downloads/htviope2016.csv') as csvfile:
spamreader = csv.reader(csvfile, delimiter=';')
for row in spamreader:
data.append (row)
print("File has been read, and it has ", len(data), " lines.")
That is all you need to read in the entire file. You don't need to – for some operations, it is sufficient to process one line at a time – but with the full data loaded and ready in memory, you can play around with it.
print (f'First row length: {len(data[0])}')
The number of cells per row. Note that this first row contains the header, and you probably don't have any use for it. Let's ditch it.
print ('Discarding 1st row NOW. Please wait.')
data.pop(0)
Done. A plain pop()
removes the last item but you can also use an index. Alternatively, you could use the more pythonic (because "slicing") data = data[1:]
but I assume this could involve copying and moving around large amounts of data.
print ('First 10 rows are ...')
for i in range(10):
print ('t'.join(data[i])+'(end)')
Look, there is data in memory! I pasted on the (end)
because of the following:
print (f'First row, first cell contains "{data[0][0]}"')
print (f'First row, last cell contains "{data[0][-1]}"')
which shows
First row, first cell contains "2016-01-01 00:00:00"
First row, last cell contains ""
because each line ends with a ;
. This empty 'cell' can trivially be removed during reading (ideally), or afterwards (as we still have it in memory):
data = [row[:-1] for row in data]
and then you get
First row, last cell contains "0"
and now you can use data[row][column]
to address any cell that you want (in valid ranges only, of course).
Disclaimer: this is my very first look at the csv
module. Some operations could possibly be done more efficiently. Practically all examples verbatim from the official documentation, which proves it's always worth taking a look there first.
Wow man, these instructions give me a massive boost in this excersise. Thank you very much for your time and the help. Because in this exersise, I work with few csv files; I changedfilename = str(input("Give the file name: ")) with open(filename) as csvfile:
– Daniel
Nov 17 '18 at 15:58
Also a question; why do you start some of the prints with f' ? Is it possible to print the date times as in the file? Atm it prints 2016-01-01, but I'd like it to be 1.1.2016 (d.m.yr)
– Daniel
Nov 17 '18 at 16:41
@Daniel: those are called f-string – click that link for Stack Overflow results, or look it up in your favourite documentation. The "dates" are printed as such because they are not dates but just the exact text as they appear in your file.
– usr2564301
Nov 17 '18 at 17:30
In the file the texts are in a format of: "1.1.2016" (check the screencapture in the OP). When I print them, the format changes.
– Daniel
Nov 17 '18 at 18:00
@Daniel: well all I know is that they are like this in your sample file, and I did not do anything to them. Sounds like you have a new question there.
– usr2564301
Nov 17 '18 at 18:08
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53325573%2fpython-getting-exact-cell-from-csv-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You import csv
at the very top but then decided not to use it. I wonder why – it seems just what you need here. So after a brief peek at the official documentation, I got this:
import csv
data =
with open('../Downloads/htviope2016.csv') as csvfile:
spamreader = csv.reader(csvfile, delimiter=';')
for row in spamreader:
data.append (row)
print("File has been read, and it has ", len(data), " lines.")
That is all you need to read in the entire file. You don't need to – for some operations, it is sufficient to process one line at a time – but with the full data loaded and ready in memory, you can play around with it.
print (f'First row length: {len(data[0])}')
The number of cells per row. Note that this first row contains the header, and you probably don't have any use for it. Let's ditch it.
print ('Discarding 1st row NOW. Please wait.')
data.pop(0)
Done. A plain pop()
removes the last item but you can also use an index. Alternatively, you could use the more pythonic (because "slicing") data = data[1:]
but I assume this could involve copying and moving around large amounts of data.
print ('First 10 rows are ...')
for i in range(10):
print ('t'.join(data[i])+'(end)')
Look, there is data in memory! I pasted on the (end)
because of the following:
print (f'First row, first cell contains "{data[0][0]}"')
print (f'First row, last cell contains "{data[0][-1]}"')
which shows
First row, first cell contains "2016-01-01 00:00:00"
First row, last cell contains ""
because each line ends with a ;
. This empty 'cell' can trivially be removed during reading (ideally), or afterwards (as we still have it in memory):
data = [row[:-1] for row in data]
and then you get
First row, last cell contains "0"
and now you can use data[row][column]
to address any cell that you want (in valid ranges only, of course).
Disclaimer: this is my very first look at the csv
module. Some operations could possibly be done more efficiently. Practically all examples verbatim from the official documentation, which proves it's always worth taking a look there first.
Wow man, these instructions give me a massive boost in this excersise. Thank you very much for your time and the help. Because in this exersise, I work with few csv files; I changedfilename = str(input("Give the file name: ")) with open(filename) as csvfile:
– Daniel
Nov 17 '18 at 15:58
Also a question; why do you start some of the prints with f' ? Is it possible to print the date times as in the file? Atm it prints 2016-01-01, but I'd like it to be 1.1.2016 (d.m.yr)
– Daniel
Nov 17 '18 at 16:41
@Daniel: those are called f-string – click that link for Stack Overflow results, or look it up in your favourite documentation. The "dates" are printed as such because they are not dates but just the exact text as they appear in your file.
– usr2564301
Nov 17 '18 at 17:30
In the file the texts are in a format of: "1.1.2016" (check the screencapture in the OP). When I print them, the format changes.
– Daniel
Nov 17 '18 at 18:00
@Daniel: well all I know is that they are like this in your sample file, and I did not do anything to them. Sounds like you have a new question there.
– usr2564301
Nov 17 '18 at 18:08
|
show 1 more comment
You import csv
at the very top but then decided not to use it. I wonder why – it seems just what you need here. So after a brief peek at the official documentation, I got this:
import csv
data =
with open('../Downloads/htviope2016.csv') as csvfile:
spamreader = csv.reader(csvfile, delimiter=';')
for row in spamreader:
data.append (row)
print("File has been read, and it has ", len(data), " lines.")
That is all you need to read in the entire file. You don't need to – for some operations, it is sufficient to process one line at a time – but with the full data loaded and ready in memory, you can play around with it.
print (f'First row length: {len(data[0])}')
The number of cells per row. Note that this first row contains the header, and you probably don't have any use for it. Let's ditch it.
print ('Discarding 1st row NOW. Please wait.')
data.pop(0)
Done. A plain pop()
removes the last item but you can also use an index. Alternatively, you could use the more pythonic (because "slicing") data = data[1:]
but I assume this could involve copying and moving around large amounts of data.
print ('First 10 rows are ...')
for i in range(10):
print ('t'.join(data[i])+'(end)')
Look, there is data in memory! I pasted on the (end)
because of the following:
print (f'First row, first cell contains "{data[0][0]}"')
print (f'First row, last cell contains "{data[0][-1]}"')
which shows
First row, first cell contains "2016-01-01 00:00:00"
First row, last cell contains ""
because each line ends with a ;
. This empty 'cell' can trivially be removed during reading (ideally), or afterwards (as we still have it in memory):
data = [row[:-1] for row in data]
and then you get
First row, last cell contains "0"
and now you can use data[row][column]
to address any cell that you want (in valid ranges only, of course).
Disclaimer: this is my very first look at the csv
module. Some operations could possibly be done more efficiently. Practically all examples verbatim from the official documentation, which proves it's always worth taking a look there first.
Wow man, these instructions give me a massive boost in this excersise. Thank you very much for your time and the help. Because in this exersise, I work with few csv files; I changedfilename = str(input("Give the file name: ")) with open(filename) as csvfile:
– Daniel
Nov 17 '18 at 15:58
Also a question; why do you start some of the prints with f' ? Is it possible to print the date times as in the file? Atm it prints 2016-01-01, but I'd like it to be 1.1.2016 (d.m.yr)
– Daniel
Nov 17 '18 at 16:41
@Daniel: those are called f-string – click that link for Stack Overflow results, or look it up in your favourite documentation. The "dates" are printed as such because they are not dates but just the exact text as they appear in your file.
– usr2564301
Nov 17 '18 at 17:30
In the file the texts are in a format of: "1.1.2016" (check the screencapture in the OP). When I print them, the format changes.
– Daniel
Nov 17 '18 at 18:00
@Daniel: well all I know is that they are like this in your sample file, and I did not do anything to them. Sounds like you have a new question there.
– usr2564301
Nov 17 '18 at 18:08
|
show 1 more comment
You import csv
at the very top but then decided not to use it. I wonder why – it seems just what you need here. So after a brief peek at the official documentation, I got this:
import csv
data =
with open('../Downloads/htviope2016.csv') as csvfile:
spamreader = csv.reader(csvfile, delimiter=';')
for row in spamreader:
data.append (row)
print("File has been read, and it has ", len(data), " lines.")
That is all you need to read in the entire file. You don't need to – for some operations, it is sufficient to process one line at a time – but with the full data loaded and ready in memory, you can play around with it.
print (f'First row length: {len(data[0])}')
The number of cells per row. Note that this first row contains the header, and you probably don't have any use for it. Let's ditch it.
print ('Discarding 1st row NOW. Please wait.')
data.pop(0)
Done. A plain pop()
removes the last item but you can also use an index. Alternatively, you could use the more pythonic (because "slicing") data = data[1:]
but I assume this could involve copying and moving around large amounts of data.
print ('First 10 rows are ...')
for i in range(10):
print ('t'.join(data[i])+'(end)')
Look, there is data in memory! I pasted on the (end)
because of the following:
print (f'First row, first cell contains "{data[0][0]}"')
print (f'First row, last cell contains "{data[0][-1]}"')
which shows
First row, first cell contains "2016-01-01 00:00:00"
First row, last cell contains ""
because each line ends with a ;
. This empty 'cell' can trivially be removed during reading (ideally), or afterwards (as we still have it in memory):
data = [row[:-1] for row in data]
and then you get
First row, last cell contains "0"
and now you can use data[row][column]
to address any cell that you want (in valid ranges only, of course).
Disclaimer: this is my very first look at the csv
module. Some operations could possibly be done more efficiently. Practically all examples verbatim from the official documentation, which proves it's always worth taking a look there first.
You import csv
at the very top but then decided not to use it. I wonder why – it seems just what you need here. So after a brief peek at the official documentation, I got this:
import csv
data =
with open('../Downloads/htviope2016.csv') as csvfile:
spamreader = csv.reader(csvfile, delimiter=';')
for row in spamreader:
data.append (row)
print("File has been read, and it has ", len(data), " lines.")
That is all you need to read in the entire file. You don't need to – for some operations, it is sufficient to process one line at a time – but with the full data loaded and ready in memory, you can play around with it.
print (f'First row length: {len(data[0])}')
The number of cells per row. Note that this first row contains the header, and you probably don't have any use for it. Let's ditch it.
print ('Discarding 1st row NOW. Please wait.')
data.pop(0)
Done. A plain pop()
removes the last item but you can also use an index. Alternatively, you could use the more pythonic (because "slicing") data = data[1:]
but I assume this could involve copying and moving around large amounts of data.
print ('First 10 rows are ...')
for i in range(10):
print ('t'.join(data[i])+'(end)')
Look, there is data in memory! I pasted on the (end)
because of the following:
print (f'First row, first cell contains "{data[0][0]}"')
print (f'First row, last cell contains "{data[0][-1]}"')
which shows
First row, first cell contains "2016-01-01 00:00:00"
First row, last cell contains ""
because each line ends with a ;
. This empty 'cell' can trivially be removed during reading (ideally), or afterwards (as we still have it in memory):
data = [row[:-1] for row in data]
and then you get
First row, last cell contains "0"
and now you can use data[row][column]
to address any cell that you want (in valid ranges only, of course).
Disclaimer: this is my very first look at the csv
module. Some operations could possibly be done more efficiently. Practically all examples verbatim from the official documentation, which proves it's always worth taking a look there first.
answered Nov 15 '18 at 21:50
usr2564301usr2564301
17.9k73372
17.9k73372
Wow man, these instructions give me a massive boost in this excersise. Thank you very much for your time and the help. Because in this exersise, I work with few csv files; I changedfilename = str(input("Give the file name: ")) with open(filename) as csvfile:
– Daniel
Nov 17 '18 at 15:58
Also a question; why do you start some of the prints with f' ? Is it possible to print the date times as in the file? Atm it prints 2016-01-01, but I'd like it to be 1.1.2016 (d.m.yr)
– Daniel
Nov 17 '18 at 16:41
@Daniel: those are called f-string – click that link for Stack Overflow results, or look it up in your favourite documentation. The "dates" are printed as such because they are not dates but just the exact text as they appear in your file.
– usr2564301
Nov 17 '18 at 17:30
In the file the texts are in a format of: "1.1.2016" (check the screencapture in the OP). When I print them, the format changes.
– Daniel
Nov 17 '18 at 18:00
@Daniel: well all I know is that they are like this in your sample file, and I did not do anything to them. Sounds like you have a new question there.
– usr2564301
Nov 17 '18 at 18:08
|
show 1 more comment
Wow man, these instructions give me a massive boost in this excersise. Thank you very much for your time and the help. Because in this exersise, I work with few csv files; I changedfilename = str(input("Give the file name: ")) with open(filename) as csvfile:
– Daniel
Nov 17 '18 at 15:58
Also a question; why do you start some of the prints with f' ? Is it possible to print the date times as in the file? Atm it prints 2016-01-01, but I'd like it to be 1.1.2016 (d.m.yr)
– Daniel
Nov 17 '18 at 16:41
@Daniel: those are called f-string – click that link for Stack Overflow results, or look it up in your favourite documentation. The "dates" are printed as such because they are not dates but just the exact text as they appear in your file.
– usr2564301
Nov 17 '18 at 17:30
In the file the texts are in a format of: "1.1.2016" (check the screencapture in the OP). When I print them, the format changes.
– Daniel
Nov 17 '18 at 18:00
@Daniel: well all I know is that they are like this in your sample file, and I did not do anything to them. Sounds like you have a new question there.
– usr2564301
Nov 17 '18 at 18:08
Wow man, these instructions give me a massive boost in this excersise. Thank you very much for your time and the help. Because in this exersise, I work with few csv files; I changed
filename = str(input("Give the file name: ")) with open(filename) as csvfile:
– Daniel
Nov 17 '18 at 15:58
Wow man, these instructions give me a massive boost in this excersise. Thank you very much for your time and the help. Because in this exersise, I work with few csv files; I changed
filename = str(input("Give the file name: ")) with open(filename) as csvfile:
– Daniel
Nov 17 '18 at 15:58
Also a question; why do you start some of the prints with f' ? Is it possible to print the date times as in the file? Atm it prints 2016-01-01, but I'd like it to be 1.1.2016 (d.m.yr)
– Daniel
Nov 17 '18 at 16:41
Also a question; why do you start some of the prints with f' ? Is it possible to print the date times as in the file? Atm it prints 2016-01-01, but I'd like it to be 1.1.2016 (d.m.yr)
– Daniel
Nov 17 '18 at 16:41
@Daniel: those are called f-string – click that link for Stack Overflow results, or look it up in your favourite documentation. The "dates" are printed as such because they are not dates but just the exact text as they appear in your file.
– usr2564301
Nov 17 '18 at 17:30
@Daniel: those are called f-string – click that link for Stack Overflow results, or look it up in your favourite documentation. The "dates" are printed as such because they are not dates but just the exact text as they appear in your file.
– usr2564301
Nov 17 '18 at 17:30
In the file the texts are in a format of: "1.1.2016" (check the screencapture in the OP). When I print them, the format changes.
– Daniel
Nov 17 '18 at 18:00
In the file the texts are in a format of: "1.1.2016" (check the screencapture in the OP). When I print them, the format changes.
– Daniel
Nov 17 '18 at 18:00
@Daniel: well all I know is that they are like this in your sample file, and I did not do anything to them. Sounds like you have a new question there.
– usr2564301
Nov 17 '18 at 18:08
@Daniel: well all I know is that they are like this in your sample file, and I did not do anything to them. Sounds like you have a new question there.
– usr2564301
Nov 17 '18 at 18:08
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53325573%2fpython-getting-exact-cell-from-csv-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
docs.python.org/3/library/csv.html
– nathan hayfield
Nov 15 '18 at 18:16
3
Are you aware of pandas library? That's well suited for this job. Do you like to explore that?
– pygo
Nov 15 '18 at 18:17
1
pandas.pydata.org/pandas-docs/stable/generated/…
– JeffCharter
Nov 15 '18 at 18:18
Thanks both. I have indeed tried to look at both of those guides, but haven't really found the right loaction where it's explained.
– Daniel
Nov 15 '18 at 18:24
1
Added a download link to the file Added also a small text.
– Daniel
Nov 15 '18 at 18:49