I was messing around with some log files for the podcast and exported a CSV. There's lots of ways for us to get stats, but I was just poking around.
我在处理播客的一些日志文件并导出了CSV。 我们有很多方法可以获取统计数据,但我只是在闲逛。
Given a CSV format like this:
给定这样的CSV格式:
"File","Hits","Bandwidth"
"/hanselminutes_0026_lo.wma","78173","163625808"
"/hanselminutes_0076_robert_pickering.wma","24626","-1789110063"
"/hanselminutes_0077.wma","17204","1959963618"
"/hanselminutes_0076_robert_pickering.mp3","15796","-55874279"
"/hanselminutes_0078.wma","14832","-1241370004"
"/hanselminutes_0075.mp3","13685","-1840937989"
"/hanselminutes_0075.wma","12129","1276597408"
"/hanselminutes_0078.mp3","11058","-1186433073"
“文件”,“命中”,“带宽” “ /hanselminutes_0026_lo.wma","78173","163625808” “ /hanselminutes_0076_robert_pickering.wma"、"24626"、"-1789110063” “ /hanselminutes_0077.wma","17204","1959963618” “ /hanselminutes_0076_robert_pickering.mp3"、"15796"、"-55874279” “ /hanselminutes_0078.wma"、"14832"、"-1241370004” “ /hanselminutes_0075.mp3","13685","-1840937989” “ /hanselminutes_0075.wma"、"12129"、"1276597408” “ /hanselminutes_0078.mp3","11058","-1186433073”
And noticing that there are different file extensions, but one logical show...for example there's an MP3 of Show 76 and WMA of that same show I wanted to find out how many downloads per show.
并注意到有不同的文件扩展名,但是一个逻辑的节目...例如,有一个Show 76的MP3和同一节目的WMA,我想找出每个节目有多少下载。
I fired up PowerShell. First I can bring in the CSV file and notice that it's parsed into a PowerShell object list nicely:
我启动了PowerShell。 首先,我可以引入CSV文件,并注意到它已经很好地解析为PowerShell对象列表:
PS C:\> import-csv File.csv | Select File,Hits
PS C:\> import-csv File.csv | 选择文件,命中
File Hits
---- ----
/hanselminutes_0026_lo.wma 78173
/hanselminutes_0076_robert_pickering.wma 24626
/hanselminutes_0077.wma 17204
/hanselminutes_0076_robert_pickering.mp3 15796
/hanselminutes_0078.wma 14832
/hanselminutes_0075.mp3 13685
/hanselminutes_0075.wma 12129
/hanselminutes_0078.mp3 11058
文件点击---- ---- /hanselminutes_0026_lo.wma 78173 /hanselminutes_0076_robert_pickering.wma 24626 /hanselminutes_0077.wma 17204 /hanselminutes_0076_robert_pickering.mp3 15796 /hanselminutes_0078.wma 14832 /hanselminutes_0075.mp3 13685 /hanselminutes_0075.wma 12129 /hanselminutes_0078.mp3 11058
Notice that there are