@scottalanmiller said in Python Cron on Windows 10:
You'll have to check your Cygwin installation and see if it is any good. That error suggests that your Cygwin does not work or is missing that DLL.
There is no DLL files seems to be missing
@scottalanmiller said in Python Cron on Windows 10:
You'll have to check your Cygwin installation and see if it is any good. That error suggests that your Cygwin does not work or is missing that DLL.
There is no DLL files seems to be missing
@romo said in Extract Data from .csv file with Python:
pip install pandas
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Since I am facing issue in Task Scheduler in Windows 10 I am going to the Python Cron which requires Cygwin.I have installed Cygwin in the machine where the Cron is installed in the machine but I am facing issue while opening the crontab i am getting the below error
code execution cannot proceed because cygwin1.dll was not found
Where the Cygwin using is from the internal version not from internet
Installed this Software from https://sourceforge.net/projects/pycron/
Any inputs from the person who tried these things in the Windows can help me on this ?
I have reinstalled Cygwin three times but no luck
@romo said in Extract Data from .csv file with Python:
@lakshmana said in Extract Data from .csv file with Python:
I am new to Python but need to autofilter the data from the excel sheet according to the Engineer name and Age of the tickets in the excel.I need to filter the data above 15 Days and copy to the another sheet of the excel.Is this possible through Python
It is indeed possible to do with python. You have great libraries built just for data analysis and manipulation for cases like this.
All the three package installed in Windows only Pandas not installing I am using Python 3.7
@romo said in Extract Data from .csv file with Python:
Printing how many rows and column in the file (rows,columns)
$ df.shape
(11,4)
If i need select the sheet 2 in the Excel means what needs to be done ?
This sorted out
clipboard | select skip -7| out-string
@romo said in Extract Data from .csv file with Python:
Now that I have some free time, I'll give you a simple example of some of the things you can do using pandas.
Our dataset will be all the posts in this topic, scraped and saved into an excel file.
DATASET : pandas-test.xslx
I am going to be using a Jupyter notebook just to make the output clearer.
$ import pandas $ pandas.read_excel('pandas-test.xlsx')
That is the whole spreadsheet read and basically printed out, but we can't work with that. We need to read the file into a variable and start working with it.# Reading the file to variable df $ df = pandas.read_excel('pandas-test.xlsx') # Printing how many rows and column in the file (rows,columns) $ df.shape (11,4) # Printing the column names $ df.columns Index(['Date', 'Time ', 'User', 'Post'], dtype='object')
Only extracting columns - Date and User
$ df[['Date', 'User']]
Lets check how many posts per day
$ df.groupby(['Date'])['User'].count()
Now lets check by day and time$ df.groupby(['Date', 'Time ']).count()
Lets filter only your posts and create a new csv file based on the data found.
$ subset = df.loc[df['User']=='Lakshmana']
Create a csv file only containing your posts
$ subset.to_csv('Lakshmana-posts.csv')
Final results your new csv file with your posts filtered out.
Lakshmana-posts.csv
EDIT: Just if you need it, an example of filtering by date and user
Good example thanks to making me understand
@scottalanmiller said in Python with Excel Auto Filter and Extract Data:
@lakshmana said in Python with Excel Auto Filter and Extract Data:
I am new to Python but need to autofilter the data from the excel sheet according to the Engineer name and Age of the tickets in the excel.
Two things here then are a problem.
- It is not an Excel file if it is CSV. So this changes the question completely. It's about CSV files.
- You don't do this in Excel, you just use Python.
So the question should be "how to extract data from text file with Python". Extremely different than the question asked.
I will try with .csv file and then convert that file into excel by powershell
Whether macros can be used in the .csv files also ?
Need to learn automation from python so trying that .Is that possible to automate through macro ?
I am new to Python but need to autofilter the data from the excel sheet according to the Engineer name and Age of the tickets in the excel.I need to filter the data above 15 Days and copy to the another sheet of the excel.Is this possible through Python
How to get rid of this error ??
Error is provided here :
Version:1.0 StartHTML:0000000159 EndHTML:0000053673 StartFragment:0000005518 EndFragment:0000053621 SourceURL
However everyday some new persons will be added or joins to ML forum. Is there a possibility to show the headcounts in the ML whoever the members of this forum and whoever login this forum should able to see the HeadCount and Monthly User Joined status as Increased or Decreased. Is this possible to do ?
@scottalanmiller ?
But this things are installed in the machine without knowledge too. How to block the same in future if needed ?
Whether used Noobs?Installation will be easy to SD card of 16GB?
I have bought the raspberry Pi Zero for testing. I have to start the os installation through SD Card. Any raspberrians here ?
https://www.silverlineelectronics.in/index.php?route=product/product&product_id=54
@scottalanmiller No I have not installed snap specifically
top output is
root@lakshmana-SVF15212SNW:~# ps -ef | grep "cryptowatch"
root 16854 8092 0 01:33 pts/2 00:00:00 grep --color=auto cryptowatch
Whether my machine is going for the CPU utilization for the crypto watch service since i have noticed in my machine today that new loop is being present in the machine which i am not aware of before
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop1 7:1 0 83.8M 1 loop /snap/core/3748
sr0 11:0 1 1024M 0 rom
loop2 7:2 0 81.3M 1 loop /snap/core/3887
loop0 7:0 0 9.3M 1 loop /snap/cryptowatch/4
What action should be taken from my end ?
The table got copied to the body of the mail through this Powershell where the timestamp or logs comes inside the body which is present above the table.How to get rid of that ??
Error is provided here :
Version:1.0 StartHTML:0000000159 EndHTML:0000053673 StartFragment:0000005518 EndFragment:0000053621 SourceURL
Powershell Code Working One
[$x1 = New-Object -comobject Excel.Application
$UserWorkBook = $x1.Workbooks.Open("C:\Location\file.xlsx")
$UserWorksheet = $UserWorkBook.Worksheets.Item(1)
$UserWorksheet.activate()
$rgeSource=$UserWorksheet.range("A1","E32")
$rgeSource.Copy() | out-null
$Results = Get-Clipboard -TextFormatType Html
$message = @{
From = '[email protected]’
To = '[email protected]'
Subject = "Test Mail -$(Get-Date)"
BodyAsHtml = $true
}
$Server = @{
smtp = 'smtp.domain.com’
}
$message.Body= "
<br>
$Results
<br>
Regards,
<br>
Username
<br>
"
Send-MailMessage @message @Server
Any other option is there i can use by replacing Get-Clipboard option