output:where does the system store the data on my machine!?

Need help with C, C++, perl, python, etc?

output:where does the system store the data on my machine!?

Postby say_hello » 2020-03-26 09:41

hello dear all good day -

freshly installed ATOM on Linux: i have to setup a lot. at the moment i have the question - where the data are stored.


for some test i run the code - taken from here:

https://stackoverflow.com/questions/608 ... -of-sate-a

Code: Select all
import pandas as pd

df = pd.read_html("https://www.mohfw.gov.in/")[-1]

df.to_csv("data.csv", index=False)


output - check online: http://www.sharecsv.com/s/09b637c5b534c ... 4/data.csv


question: where does the system store the data on my machine!?

second example: of scraping to csv: https://stackoverflow.com/questions/366 ... v-scraping
I am attempting to scrape some simple dictionary information from an html page. So far I am able to print all the words I need on the IDE. My next step was to transfer the words to an array. My last step was to save the array as a csv file... When I run my code it seems to stop taking information after the 1309th or 1311th word, although I believe there to be over 1 million on the web page. I am stuck and would be very appreciative of any help. Thank you

[file: mso_anu_edu_au.py ]

Code: Select all
from bs4 import BeautifulSoup
from urllib import urlopen
import csv

html = urlopen('http://www.mso.anu.edu.au/~ralph/OPTED/v003/wb1913_a.html').read()

soup = BeautifulSoup(html,"lxml")

words = []

for section in soup.findAll('b'):

    words.append(section.renderContents())

print ('success')
print (len(words))

myfile = open('A.csv', 'wb')
wr = csv.writer(myfile)
wr.writerow(words)



output:

Code: Select all
success
11616
[Finished in 29.609s]



question: where does the system store the data on my machine!?
User avatar
say_hello
 
Posts: 24
Joined: 2019-10-13 09:58

Re: output:where does the system store the data on my machin

Postby pylkko » 2020-03-27 08:56

I am going to guess that pandas uses pwd to save since you do not specify the absolute path. However, the only way to know this is to read it from the manual/API reference. I strongly suggest that you learn to do this, because you will never get far developing anything if you do not know how to get a definite answer to things like this yourself. Also, a hint: you can install addons to Atom, so that when you hover the cursor over something, it will open a pop-up window which tells you these things (i.e python documentation) so that you don't need to google every single thing you come across.

In the second case it looks like you saved the things to a list variable called "words". This is located in RAM.
User avatar
pylkko
 
Posts: 1778
Joined: 2014-11-06 19:02

Re: output:where does the system store the data on my machin

Postby Luna Moon » 2020-03-29 08:47

pylkko wrote:Also, a hint: you can install addons to Atom, so that when you hover the cursor over something, it will open a pop-up window which tells you these things (i.e python documentation) so that you don't need to google every single thing you come across.


I strongly agree with this! It will help you a lot at your current status and might help you learn faster.
Kind regards
Luna Moon
 
Posts: 11
Joined: 2018-02-19 11:52
Location: Europe

Re: output:where does the system store the data on my machin

Postby say_hello » 2020-04-01 16:43

hello dear pylkko and luna moon

first of all - many many tanks for the reply and the sharing your ideas. I tried to shed a light on all that issues and to get ATOM up and running and working for me.

i have had a closer look at ATOM itself and also at the forums over there.

i found very interesting threads which can be helpful:


they are talking about things like the following:

a. I can’t remember the last time I used the

b. standard File > Save dialog.

one thread is the following: Display a “Save As” dialog?
https://discuss.atom.io/t/display-a-sav ... alog/30499

idleberg Jun says: a build package of mine, I’m saving the file prior to when the user triggers the build command. I would like to show a “Save As” dialog, when the buffer hasn’t been saved before. The TextEditor class has a saveAs() method, but that requires a path to be passed. The decision where a file gets saved to, should be the user’s decision. So I was wondering what alternative there is? IMHO, the saveAs() method should pop up a dialog, when there’s no path specified./quote]

Default Save Location?
https://discuss.atom.io/t/default-save-location/19111
leedohm says
I can’t remember the last time I used the standard File > Save dialog. I just use the advanced-new-file package 625 to name the file when I create it and then just save it.


DamnedScholar says:
When you save a file in a blank Atom window, the directory that file is in is automatically added as a project folder. When you save additional files, Atom will assume that they’re going to the same place. For how Atom thinks about projects, this is very reasonable (and since Atom is Atom, its behavior will differ from Word/Libre/Notepad which don’t have any opinions about projects). To circumvent this, just add a new project folder for each additional place you intend to save files for a given Atom window. Once you have a project folder added for a particular directory, you can simply right-click on anywhere in the tree view and select New File to create a file in that specific folder and not have to deal with the Save As dialog at all.


they talk about a interesting package: This here advanced-new-file
https://atom.io/packages/advanced-new-file
Updated version of Fancy New File. Create multiple files and directories by typing a relative path.

Advanced New File package Please switch to Advanced Open File Advanced New File is fork of existing package Fancy New File. First of all let me thank rev087 - author of Fancy New File for great work. I forked this folder because old one wasn't maintained for few months and I couldn't contact the author. advanced New File is a package for helping Atom users to create new files and folders more easily. It supports create new files and directory tree by typing a relative path with bash-like autocomplete support.
If you have any ideas or even better pull requests, please let me know :)
If you like Atom maybe you will like my blog www.atomtips.com.
How to Use Simply press alt-cmd-n, or ctrl-alt-n, depending on your platform.

Example. Settings:All settings can be turned on and off via the built-in settings tab (cmd-,) and selecting Advanced New File from the list of installed packages.

-Case Sensitive Auto Completion
-Show Files In Auto Completion
-Suggest Current File Path
-Remove whole folder
-Create file instantly


i guess that i can get the things done - i will keep you informed.

again many thanks for your replies and the idea sharing.
User avatar
say_hello
 
Posts: 24
Joined: 2019-10-13 09:58


Return to Programming

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable