Quiet@Remove["Global`*"];
$HistoryLength=2;
SetDirectory[NotebookDirectory[]];

Quiet@Remove["Global`*"];
files=FileNames["*.csv"];
index=1;
file=files[[index]];
data=Prepend[Import[file],{0,0}]/.{u_,i_}:>{i,u};
pl1=ListPlot[data,PlotStyle->{Red,PointSize[0.015]},AxesLabel->{"i[A]","u[V]"},GridLines->Full];
iMax=data[[-1,1]];
fit[i_]=Fit[data,{i,(i^2),(i^3)},i]
pl2=Plot[fit[i],{i,0,iMax}];
Show[pl1,pl2]
maximum[Uz_]:=Quiet@FindMaximum[i*(Uz-fit[i]),{i,1}][[1]]
dataMax={#,maximum[#]}&/@Range[0,30,0.1];
pla=ListPlot[dataMax,PlotStyle->{Red,Thickness[0.006]},AxesLabel->{"Uz[V]","Pmax[W]"},GridLines->Full,Joined->True,PlotLabel->"zarovka cislo "<>ToString[index]];

maximum2[Uz_]:=Module[{max},max=Quiet@FindMaximum[i*(Uz-fit[i]),{i,1}];
{i/.max[[2]],max[[1]]}
];
dataMax2=maximum2/@Range[0,30,0.1];
plb=ListPlot[dataMax2,PlotStyle->{Red,Thickness[0.006]},AxesLabel->{"i[A]","Pmax[W]"},GridLines->Full,Joined->True,PlotLabel->"zarovka cislo "<>ToString[index]];

UzTrial=24;
imax=i/.Solve[(UzTrial-fit[i])==0][[2]];
plc=Plot[(UzTrial-fit[i])*i,{i,0,imax},PlotStyle->{Red,Thickness[0.006]},AxesLabel->{"i[A]","Pmax[W]"},GridLines->Full,PlotLabel->"zarovka cislo "<>ToString[index]<>" pro Uz= "<>ToString[UzTrial]<>" V"];

GraphicsColumn[{pla,plb,plc}]

maximum[15]

Import[file]