I was trying to create a plot with seaborn, but I faced an error:
*** ValueError: If using all scalar values, you must pass an index
In my program I have read an output file from XFOIL and was trying to plot its results to check it out.
XFOIL File format:
# x Cp
1.00000 0.24276
0.99818 0.23883
0.99591 0.22657
0.99342 0.21421
0.99066 0.20128
0.98759 0.18802
0.98413 0.17434
0.98020 0.16018
0.97569 0.14544
0.97044 0.12999
0.96429 0.11374
0.95703 0.09661
### **(the file is big, and I will not transcript it completely here)** ###
I decided to create a dataframe to enable the plotting process easily.
lst = fl.readlines()
lst_splt = [ s.replace('#','').split() for s in lst]
cp = pd.DataFrame.from_records(lst_splt[1:], columns=lst_splt[:1]).astype(float)
and finally I tried to plot it using seaborn:
sns.lineplot(x='x',y='Cp', data=cp)
but as I said on the beginning of the question, an error appeared:
*** ValueError: If using all scalar values, you must pass an index
What can I do to fix this error?

If using all scalar values, you must pass an indexinto a search engine?sns.lineplotand not on the unusual lookingpd.DataFrame.from_records. Can you print outcp.head()just after the dataframe creation?cp = pd.read_csv(flname,'r', sep='\s+',skiprows=(3), header=None, index=[0])the error*** TypeError: read_csv() got multiple values for argument 'sep'persists on read cp. I didn"t managed to get tosns.lineplotwith this modification