Thank you.... I have been searching on how to convert a column in a csv to a list / dynamically calculate the number of unique elements in a HUGE csv file... or rather, since I'm so new to programming, didn't even know what to ask. You are a great help my friend. Be blessed!
@DataEngUncomplicated3 жыл бұрын
I'm glad the video was helpful! Thank you for leaving a comment!
@nishantkumar-lw6ce3 жыл бұрын
You could also use pandas library to convert to list.
@tarunsoni27643 жыл бұрын
BRUHHHH, literally , you solved my problem. actually i was given a csv file of almost 3000 rows and 5 column, and i was asked to calculate covariances , correlations, it helped me completely
@DataEngUncomplicated3 жыл бұрын
Hey Tarun, glad you found it helpful. Thanks for watching!
@richardallen1555 Жыл бұрын
i spent two days looking for a way to do my assignment and this 5 minute video was all i needed, i really need to get better at searching for what i dont know haha
@DataEngUncomplicated Жыл бұрын
I'm glad it was helpful!
@teach49442 жыл бұрын
you just safed me hours of typing. thanks a lot
@DataEngUncomplicated2 жыл бұрын
You're welcome Joshua!
@the_dev_life3 жыл бұрын
Very useful video! Well paced and very clear. 👏
@DataEngUncomplicated3 жыл бұрын
Thanks a lot!
@mahsaamini8555 Жыл бұрын
Very useful video, thank you!
@DataEngUncomplicated Жыл бұрын
Thanks Mahsa, I'm glad you found it helpful!
@chritophergaafele8922 Жыл бұрын
Thank you very much
@DataEngUncomplicated Жыл бұрын
You're welcome!
@vitorribeirosa Жыл бұрын
Thanks for sharing this very useful content. Cheers!!!!
@DataEngUncomplicated Жыл бұрын
Thanks Vitor!
@romanvavryk88803 жыл бұрын
Thanks mate, you saved my life
@DataEngUncomplicated3 жыл бұрын
You're welcome Roman, I'm glad it was helpful.
@revenge94313 жыл бұрын
hello, in your example. What if you wanted to continue with the next 10 rows, how would you write that? If you stop at row 10, rest for 1min then continue to the next ten until complete. thanks
@DataEngUncomplicated2 жыл бұрын
I think on the read method, there should be a way to limit how many records are read in but I haven't tried this myself.
@mercedehsasanpour5575 Жыл бұрын
Thank you. One question; how about the situation that I want to add a new column using the data I have in my csv file? for example I have 2 columns in my csv file called open and close. I want to add a new column that shows (close - open)/open I know it should be a code like follow with open('IBM.csv', 'r')as input: with open ('IBM.csv', 'w') as output: writer = csv.writer(output, lineterminator=' ') reader=csv.reader(input) And then I need to use append. but I have no idea now to put all this together and write my final code!
@DataEngUncomplicated Жыл бұрын
You're welcome. Have you used the python library pandas before? If your comfortable working with dataframes, if would be very easy to read the CSV file and then add a new column to it, then write it back to CSV.
@mercedehsasanpour5575 Жыл бұрын
@@DataEngUncomplicated Thanks, yes it can be done using pandas but I am trying to do it manually. so far I wrote this code: with (open('IBM.csv', newline='', encoding='utf-8') as infile, open('IBM.csv', 'w', newline='', encoding='utf-8') as outfile): reader = csv.DictReader(infile) writer = csv.DictWriter(outfile, fieldnames=['Open', 'Close']) writer.writeheader() for row in reader: #implement this formula (close - open)/open change = ['Close' - 'Open'] / ['Open'] change.append(IBM.csv) print(change.append(IBM.csv)) The first section should be right, but after #implement this formula is not.
@scarletv.3825 Жыл бұрын
I have a question after we pick the column. Is there a way to pick only certain rows within that column? I tried changing the "count." To start from a different number instead of 0 but that didn't work.
@DataEngUncomplicated Жыл бұрын
Do you know the criteria you want to pick your specific rows on? You would need to handle that once your data is in python. I don't think it can be done on read. ( I could be wrong).
@KhalilYasser3 жыл бұрын
Awesome. Thanks a lot...
@DataEngUncomplicated3 жыл бұрын
You're welcome!
@teach49442 жыл бұрын
Danke!
@DataEngUncomplicated2 жыл бұрын
Wow thanks for the super thanks Joshua, it is very much appreciated!
@anurathilakbandara37052 жыл бұрын
how to find transpose of single column data?
@DataEngUncomplicated2 жыл бұрын
Hi anura, I discuss this in the second part of the video.
@anurathilakbandara37052 жыл бұрын
@@DataEngUncomplicated Thank you very much!
@iamvalenci42 жыл бұрын
thank you!!
@DataEngUncomplicated2 жыл бұрын
You're welcome!
@maxli9132 жыл бұрын
It’s saying my ‘title’ is not defined
@DataEngUncomplicated2 жыл бұрын
Hi Max, without much context I'm not sure what this relates to
@maxli9132 жыл бұрын
@@DataEngUncomplicated hey I’m reading a csv file with movie names, rating, description, genre and etc.. I trying to print out the movie name and descriptions together like this when the user input is (‘P’) ( title : description title: description……) and I am thinking this will help with later when I need to add a Filter
@DataEngUncomplicated2 жыл бұрын
Sounds like you want to use a python dictionary instead of a python list. Check out my other video that walks through how to get a python dictionary from a csv in python
@maxli9132 жыл бұрын
@@DataEngUncomplicated oki thank you
@maxli9132 жыл бұрын
@@DataEngUncomplicated you are such a nice KZbinr btw there aren’t much people like you out there so keep up the good work 😊
@PCAN4113 жыл бұрын
Do you know that the audience cannot see what you are talking about because of font size too small?
@DataEngUncomplicated3 жыл бұрын
Thanks for the heads up, I will make sure my next video uses a larger font. Setting the quality to 1080p will make sure the font is crisp.