简体   繁体   中英

Accidently deleted all my jupyter notebook data still showing data in jupyter Variables

Hi i accidentelly deleted my jupyterlab notebook data i was trying to save the data from ipynb into csv format I used the command:

path = ('F:\jupyter Lab Projects\Automotive residual value.ipynb')
df.to_csv(path)

after i exeuted the command everything vanished from my ipynb notebook i tried to revert the commad by doing ctrl + z but nothing happend But i can see my data in a jupyter Variable section located below right side of terminal section. I am using VSCODE and anaconda library Please help me f anyone knows how to recover the data i really work hard to create that data. thanks in advance.

I tried to revert the command by pressing ctrl+ z but nothing happened

AS i told you earlier data is showing in jupyter variables but not in notebook so there night be a chance to recover it as notebook here is the link for the notebook.

https://drive.google.com/file/d/1Tfi7vXuC_JAvsB7lLMvxeQRrJGPks2gA/view?usp=sharing

Try downloadig your dotepad as a .ipynb file and then viw it as a text file in a text editor (open with editor).

Using that, I got those values. Is that what you need?:

,symboling,normalized-losses,make,fuel-type,aspiration,num-of-doors,body-style,drive-wheels,engine-location,wheel-base,length,width,height,curb-weight,engine-type,num-of-cylinders,engine-size,fuel-system,bore,stroke,compression-ratio,horsepower,peak-rpm,city-mpg,highway-mpg,price,city-L/100KM,horsepower-binned
0,3.0,122.0,alfa-romero,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548.0,dohc,four,130.0,mpfi,3.47,2.68,9.0,111,5000.0,21.0,27.0,13495.0,11.19047619047619,Low
1,3.0,122.0,alfa-romero,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548.0,dohc,four,130.0,mpfi,3.47,2.68,9.0,111,5000.0,21.0,27.0,16500.0,11.19047619047619,Low
2,1.0,122.0,alfa-romero,gas,std,two,hatchback,rwd,front,94.5,171.2,65.5,52.4,2823.0,ohcv,six,152.0,mpfi,2.68,3.47,9.0,154,5000.0,19.0,26.0,16500.0,12.368421052631579,Medium
3,2.0,164.0,audi,gas,std,four,sedan,fwd,front,99.8,176.6,66.2,54.3,2337.0,ohc,four,109.0,mpfi,3.19,3.4,10.0,102,5500.0,24.0,30.0,13950.0,9.791666666666666,Low
4,2.0,164.0,audi,gas,std,four,sedan,4wd,front,99.4,176.6,66.4,54.3,2824.0,ohc,five,136.0,mpfi,3.19,3.4,8.0,115,5500.0,18.0,22.0,17450.0,13.055555555555555,Low
5,2.0,122.0,audi,gas,std,two,sedan,fwd,front,99.8,177.3,66.3,53.1,2507.0,ohc,five,136.0,mpfi,3.19,3.4,8.5,110,5500.0,19.0,25.0,15250.0,12.368421052631579,Low
6,1.0,158.0,audi,gas,std,four,sedan,fwd,front,105.8,192.7,71.4,55.7,2844.0,ohc,five,136.0,mpfi,3.19,3.4,8.5,110,5500.0,19.0,25.0,17710.0,12.368421052631579,Low
7,1.0,122.0,audi,gas,std,four,wagon,fwd,front,105.8,192.7,71.4,55.7,2954.0,ohc,five,136.0,mpfi,3.19,3.4,8.5,110,5500.0,19.0,25.0,18920.0,12.368421052631579,Low
8,1.0,158.0,audi,gas,turbo,four,sedan,fwd,front,105.8,192.7,71.4,55.9,3086.0,ohc,five,131.0,mpfi,3.13,3.4,8.3,140,5500.0,17.0,20.0,23875.0,13.823529411764707,Medium
9,2.0,192.0,bmw,gas,std,two,sedan,rwd,front,101.2,176.8,64.8,54.3,2395.0,ohc,four,108.0,mpfi,3.5,2.8,8.8,101,5800.0,23.0,29.0,16430.0,10.217391304347826,Low
10,0.0,192.0,bmw,gas,std,four,sedan,rwd,front,101.2,176.8,64.8,54.3,2395.0,ohc,four,108.0,mpfi,3.5,2.8,8.8,101,5800.0,23.0,29.0,16925.0,10.217391304347826,Low
11,0.0,188.0,bmw,gas,std,two,sedan,rwd,front,101.2,176.8,64.8,54.3,2710.0,ohc,six,164.0,mpfi,3.31,3.19,9.0,121,4250.0,21.0,28.0,20970.0,11.19047619047619,Medium
12,0.0,188.0,bmw,gas,std,four,sedan,rwd,front,101.2,176.8,64.8,54.3,2765.0,ohc,six,164.0,mpfi,3.31,3.19,9.0,121,4250.0,21.0,28.0,21105.0,11.19047619047619,Medium
13,1.0,122.0,bmw,gas,std,four,sedan,rwd,front,103.5,189.0,66.9,55.7,3055.0,ohc,six,164.0,mpfi,3.31,3.19,9.0,121,4250.0,20.0,25.0,24565.0,11.75,Medium
14,0.0,122.0,bmw,gas,std,four,sedan,rwd,front,103.5,189.0,66.9,55.7,3230.0,ohc,six,209.0,mpfi,3.62,3.39,8.0,182,5400.0,16.0,22.0,30760.0,14.6875,Medium
15,0.0,122.0,bmw,gas,std,two,sedan,rwd,front,103.5,193.8,67.9,53.7,3380.0,ohc,six,209.0,mpfi,3.62,3.39,8.0,182,5400.0,16.0,22.0,41315.0,14.6875,Medium
16,0.0,122.0,bmw,gas,std,four,sedan,rwd,front,110.0,197.0,70.9,56.3,3505.0,ohc,six,209.0,mpfi,3.62,3.39,8.0,182,5400.0,15.0,20.0,36880.0,15.666666666666666,Medium
17,2.0,121.0,chevrolet,gas,std,two,hatchback,fwd,front,88.4,141.1,60.3,53.2,1488.0,l,three,61.0,2bbl,2.91,3.03,9.5,48,5100.0,47.0,53.00000000000001,5151.0,5.0,Low
18,1.0,98.0,chevrolet,gas,std,two,hatchback,fwd,front,94.5,155.9,63.6,52.0,1874.0,ohc,four,90.0,2bbl,3.03,3.11,9.6,70,5400.0,38.0,43.0,6295.0,6.184210526315789,Low
19,0.0,81.0,chevrolet,gas,std,four,sedan,fwd,front,94.5,158.8,63.6,52.0,1909.0,ohc,four,90.0,2bbl,3.03,3.11,9.6,70,5400.0,38.0,43.0,6575.0,6.184210526315789,Low
20,1.0,118.0,dodge,gas,std,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,1876.0,ohc,four,90.0,2bbl,2.97,3.23,9.41,68,5500.0,37.0,41.0,5572.0,6.351351351351352,Low
21,1.0,118.0,dodge,gas,std,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,1876.0,ohc,four,90.0,2bbl,2.97,3.23,9.4,68,5500.0,31.0,38.0,6377.0,7.580645161290323,Low
22,1.0,118.0,dodge,gas,turbo,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,2128.0,ohc,four,98.0,mpfi,3.03,3.39,7.6,102,5500.0,24.0,30.0,7957.0,9.791666666666666,Low
23,1.0,148.0,dodge,gas,std,four,hatchback,fwd,front,93.7,157.3,63.8,50.6,1967.0,ohc,four,90.0,2bbl,2.97,3.23,9.4,68,5500.0,31.0,38.0,6229.0,7.580645161290323,Low
24,1.0,148.0,dodge,gas,std,four,sedan,fwd,front,93.7,157.3,63.8,50.6,1989.0,ohc,four,90.0,2bbl,2.97,3.23,9.4,68,5500.0,31.0,38.0,6692.0,7.580645161290323,Low
25,1.0,148.0,dodge,gas,std,four,sedan,fwd,front,93.7,157.3,63.8,50.6,1989.0,ohc

and a lot more lines..

As your file provided in the google-colab link is broken, we can't extract more than that out of it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM