Python Forum
Yahoo_fin, Pandas: how to convert data table structure in csv file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Yahoo_fin, Pandas: how to convert data table structure in csv file
#12
(Feb-15-2021, 06:05 AM)detlefschmitt Wrote: Regarding the advice to read the csv file into python rather than using Excel VBA to create a string that then needs to be pasted into the python script. That I do not consider an advice. It should be obvious to anybody with just a little programming skills that that is possible and more efficient. As I explained in my now removed post, due to private matters posted, I was just not willing to spend the time figuring out how to do it. I had other priorities. Writing the VBA took me a couple minutes. But eventually my curiosity took over and I did put in the work to learn how to do it in python. Figuring out how to read the csv and that I need to convert the ticker column to a list before it can be further processed took me a couple hours. If I would have been given an example on how this is done conceptually I could have learned it in a few minutes. That would have been advice. Yes, advice should include encouraging to think, but it should much more importantly help in speeding up the learning process. But to your defense I have to add that I discouraged you to give me advice in the form of code. But bottom line, as is, your input should, in my opinion, not counted as advice.

I did show how to read csv file. In my very first post in this thread. So, only you if did pay attention...
(Feb-12-2021, 09:47 AM)buran Wrote:
import pandas as pd
df = pd.read_csv('test.csv')

Then, converting dataframe column to list is google search away. Not that you need to convert to list, you can just iterate over dataframe column values.
By the way, same apply to reading from csv or excel, if you ignored my first post.
So, couple of hours spent on this is your problem, not my fault.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Yahoo_fin, Pandas: how to convert data table structure in csv file - by buran - Feb-15-2021, 06:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [SOLVED] Correct way to convert file from cp-1252 to utf-8? Winfried 8 917 Feb-29-2024, 12:30 AM
Last Post: Winfried
  Better python library to create ER Diagram by using pandas data frames as tables klllmmm 0 1,152 Oct-19-2023, 01:01 PM
Last Post: klllmmm
  Trying to get counts/sum/percentages from pandas similar to pivot table cubangt 6 1,431 Oct-06-2023, 04:32 PM
Last Post: cubangt
Thumbs Up Convert word into pdf and copy table to outlook body in a prescribed format email2kmahe 1 767 Sep-22-2023, 02:33 PM
Last Post: carecavoador
  Using pyodbc&pandas to load a Table data to df tester_V 3 831 Sep-09-2023, 08:55 PM
Last Post: tester_V
  Hard disk structure like a file selection dialog malonn 2 803 Aug-09-2023, 09:14 PM
Last Post: malonn
  Convert File to Data URL michaelnicol 3 1,184 Jul-08-2023, 11:35 AM
Last Post: DeaD_EyE
  Python Script to convert Json to CSV file chvsnarayana 8 2,553 Apr-26-2023, 10:31 PM
Last Post: DeaD_EyE
  python pandas sql table with header mg24 3 1,976 Dec-08-2022, 08:31 PM
Last Post: Larz60+
  openpyxl convert data to float jacklee26 13 6,035 Nov-19-2022, 11:59 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020