ebranlard / pyDatView

A crossplatform GUI to plot tabulated data from files (e.g. CSV, Excel, OpenFAST, HAWC2, Flex...), or python pandas dataframes
MIT License
109 stars 43 forks source link

How to prepare the data of CSV file to plot #177

Closed Qianyu1998 closed 9 months ago

Qianyu1998 commented 11 months ago

Hi, thanks for your sharing. This is not a issue, i just wonder to know how to prepare data for this App to plot figure. In other words, how to set the input CSV file's format .

ebranlard commented 11 months ago

Hi @Qianyu1998 I'm sorry, I seem to have missed your issue. Did you figure it out?

In general, the reader is fairly forgiving and tries it's best, when the files are delimited with commas, tabs, spaces, semi column. The best is to have the column names on the first line. A couple of comments can be introduced on the first few lines before the columns or after, but it's not necessarily recommended.

The weio repository has examples of CSV files supported (in the folder weio/tests/example_files )

Here are some example links: https://raw.githubusercontent.com/ebranlard/weio/main/weio/tests/example_files/CSVComma.csv https://raw.githubusercontent.com/ebranlard/weio/main/weio/tests/example_files/CSVSemi.csv https://raw.githubusercontent.com/ebranlard/weio/main/weio/tests/example_files/CSVNoHeader.csv https://raw.githubusercontent.com/ebranlard/weio/main/weio/tests/example_files/CSVTab.csv https://raw.githubusercontent.com/ebranlard/weio/main/weio/tests/example_files/CSVTwoLinesHeaders.txt https://raw.githubusercontent.com/ebranlard/weio/main/weio/tests/example_files/CSVxIsString.csv https://raw.githubusercontent.com/ebranlard/weio/main/weio/tests/example_files/CSVAutoCommentChar.txt