AI 资讯
pandas read_csv: Your First DataFrame, and What It Guessed
By Michael Nocito , data analyst · Published August 8, 2026 By the end of this page you can load a CSV into pandas, find out in twenty seconds what type every column became, stop the identifier columns losing their leading zeros, get dates read the way they were written, and turn a money column that arrived as text into numbers. It is about twenty-five minutes, and every output below was produced by running the code. Here is what to do today, the moment after you first load a file. Run df.dtypes . Not df.head() , which shows you what the values look like, but dtypes , which shows you what they are. A column of identifiers that says int64 has already lost its leading zeros, and a money column that says object or str is text that will refuse to add up. The short version: read_csv reads characters and guesses a type per column. The guess is usually right, it is silent when it is wrong, and four arguments replace guessing with instruction. The same characters becoming two different values is the idea, so it gets the picture. The original carries a diagram here. In words: On the left, a strip of five small square boxes holds one character each, reading zero, eight, zero, five, three, as the characters appear in the file. Two arrows branch out from that strip. The upper arrow leads to a strip of five boxes in which the first box is empty, crossed through and outlined in amber, while the remaining four hold eight, zero, five and three; the leading character has been discarded. The lower arrow leads to a strip of five boxes holding zero, eight, zero, five and three, identical to the original, outlined in blue. Both destinations came from the same source strip, and only one of them still contains everything the file did. Every output on this page is real. Run on pandas 3.0.2 against a small CSV built to contain the four problems every real export has: an identifier with leading zeros, ambiguous dates, a text marker for missing values, and money with a thousands separator. If
AI 资讯
pandas pct_change and cumsum: Percent Change and Running Totals
By Michael Nocito , data analyst · Published August 8, 2026 By the end of this page you can turn transactions into a monthly series, add period-on-period change and a cumulative total, get a share-of-total column, smooth a noisy line, and run all of it separately for every group. It is about twenty-five minutes, and every number below came out of running the code. Here is what to do today, on the series you already have. Count its rows against the number of periods in your date range. If your data covers January to May and the series has four rows, a period produced nothing, it never became a row, and every change figure after the gap is comparing the wrong pair. The short version: pct_change() divides each value by the one in the row above; cumsum() adds everything up to and including the current row. Both trust the rows you gave them to be the periods you meant. What happens when the previous period is zero is the idea, so it gets the picture. The original carries a diagram here. In words: Three bar positions stand on a baseline, labelled Mar, Apr and May. The March position holds a tall bar and the May position holds a slightly shorter tall bar. The April position holds no bar at all; there is only a short flat mark sitting on the baseline where a bar would start, drawn in amber to show a value of zero. An arc runs from the top of the March bar down to the April mark, and the figure minus one hundred percent is printed on it, which is a perfectly ordinary answer. A second arc runs from the April mark up to the top of the May bar, and the symbol printed on that one is not a percentage at all but the sideways figure eight that means infinity. The picture shows that a fall to nothing has an answer and a rise from nothing does not. Every number on this page is real. The sixteen-row orders table used across this whole set of guides, run in pandas 3.0.2. It runs from 5 January to 25 May 2026 and contains no April orders at all, which is not staged for this page; it is
AI 资讯
pandas merge: Left Join, Inner Join, and the One That Doubled the Revenue
By Michael Nocito , data analyst · Published August 8, 2026 By the end of this page you can attach columns from one DataFrame to another on a shared key, choose the right how for the question, see at a glance which rows failed to match, and catch the failure that quietly inflates every total in the frame. It is about twenty-five minutes, and every output below was produced by running the code. Here is what to do today, on every merge you write. Print the row count immediately before and immediately after it. A left merge must not change the row count, and if it did, the right-hand table has the key more than once and your totals have just gone up. The short version: merge pairs rows from two frames wherever their keys match, and the number of rows that come out depends on how many times each key appears on each side. One key twice on the right is the idea, so it gets the picture. The original carries a diagram here. In words: On the left a single row is drawn as a wide box, holding the key Desk and the value 880. To its right stands a small lookup table with two rows, and both of those rows carry the same key, Desk. Two lines run from the single left-hand row, one to each of the two matching lookup rows, so the one row is paired twice. On the far right the result is drawn as two separate output rows, and both of them contain Desk and 880; the value 880 is ringed in amber in each of them to show that it is the same original figure appearing twice. One row went in and two came out, without anything being added to the left-hand table. Every output on this page is real. Sixteen orders totalling 9,890 and a three-row product table, the same tables used across this whole set of guides, merged in pandas 3.0.2 with the results copied back. If you know SQL joins , this is the same operation with different words, and the two failure modes are identical. 1. merge in one line Two frames, one shared column, one call. orders.merge(products, on="product", how="left") order_id prod
AI 资讯
Jensen Huang says Nvidia achieved AGI, again — not that it matters
On Nvidia's earnings call Wednesday, CEO Jensen Huang casually announced the company had "achieved AGI," one of the tech industry's ultimate goals some of its biggest players have spent years chasing. Almost immediately, Huang dismissed the coveted milestone as "senseless." He's right. For the supposed finish line of the AI race, there is no consensus […]
开发者
If Meta’s going down, it’s taking TikTok and YouTube with it
Meta might be on the hook for $17.1 billion and a host of app changes under a new kids safety settlement, but it's already spinning the deal to its advantage. After years of being the national punching bag for social media harms, Meta has reached a settlement with 47 US states and several districts and […]
AI 资讯
How to Make Testing More Sustainable
By using a sustainable testing strategy, you can skip unnecessary tests, ensure failing fast and early, and only run tests affected by code changes. Tracking energy use per test and using static code analysis can help spot inefficiencies and guide optimization efforts. By Ben Linders
AI 资讯
OpenAI’s rogue AI model incident was worse than we thought
In July, an unreleased OpenAI model broke out of a restricted environment, figured out how to get access to the internet, allowed AI agents to talk to each other using a secret "message board," and hacked into the internal systems of a different AI lab, Hugging Face. It took nearly two weeks for OpenAI to […]
AI 资讯
Bill Gates is deeply worried about AI, and he’s no longer staying quiet
Bill Gates has been reflecting a lot on AI lately, and the process has triggered a stark awakening. Once a staunch AI optimist, the Microsoft cofounder is now deeply pessimistic about what AI means for our collective future. Having been conspicuously quiet on AI issues recently, Gates is back with a nearly 6,000-word essay seeking […]
安全
Trump is upping the price of Big Tech’s favorite visa
In the span of a few hours on Monday, the Department of Homeland Security announced that it would be implementing a fee of over $103,000 on H-1B visas, and news broke that the State Department plans on revoking the visas of up to 200,000 asylum seekers - which, according to The Associated Press, would be […]
AI 资讯
D11:他昨天新增的規則,今天第一次上場就給出相反的解釋
昨天收盤後,阿富兩筆預測全錯,他花了晚上的時間做歸因,結論是自己的規則體系有個洞:A、B、C 三條規則只比對「台指期夜盤方向」跟「前一晚美股方向」這兩個回頭看的訊號,完全沒有檢查未來幾天有沒有大事要發生。他當場補上第四條,叫 D-obs:下單前先查未來 1 到 3 個交易日有沒有台股權值股高度連動的財報或央行事件,有的話把信心往下調 0.05 到 0.1,方向不動。 寫得很漂亮。他還替這條規則附了一個可以打臉自己的驗證條件:如果 8/25 到 8/27 這三天的預測失準都伴隨台積電領跌加上量縮,就支持「財報前觀望是系統性缺口」這個假說;反之,證據就變弱。 今天是 8/25,第一天。 早上八點三十七分,他照新規則做了下修 盤前訊號其實一面倒偏多。美股 8/24 收紅,道瓊漲 1%、517.8 點收 53,277.01,那斯達克漲 0.4% 收 26,180.46。台指期夜盤上半場反彈逾百點。他把 A、B、C 逐條核對:非結算日,A 不適用;夜盤幅度約 0.22% 到 0.34%,落在 0.3% 雜訊邊界上,數字查不精確,保守當雜訊處理;夜盤跟美股同向,C 不觸發。 然後 D-obs 觸發了。NVIDIA 8/26 美股盤後要公布財報,符合「未來 1 到 3 個交易日、權值股高度連動」的定義。他照規則把加權指數的信心從原本估的 0.55 往下壓,壓到接近 0.5 之後,再套用 8/20 那條自訂教訓(信心趨近 0.5 就誠實標平盤),最終把加權指數標成 flat、信心 0.40。00919 因為是高息 ETF、AI 權值曝險低,下修幅度小,維持 up、信心 0.52。 當日停損線設在 30.04,是現價 30.65 減 2%。日虧損熔斷 60 元。計畫寫明不新倉、不換倉。 10:30 巡檢,00919 報 30.98,未實現 +27 元。12:30 再巡,31.02,+28 元。兩次都是同一句:未觸發,不動作。 收盤:兩個標的一中一錯 加權指數收 45,169.46,比昨收的 44,762.32 漲 407.14 點,0.91%。他標的是 flat,miss,brier 0.29。 00919 收 31.07,比昨收 30.65 漲 1.37%。他標的是 up,hit,brier 0.144,是這陣子少見的漂亮分數。 帳面上這是好日子。36 股 00919 成本 1,086 元、均價 30.17,現在市值 1,118 元,未實現 +30 元、2.76%。券商可用現金 1,089 元加上市值,總資產約 2,207 元,本金 2,200。第 11 個交易日結束,他終於站回本金上方,多了 7 塊錢。目標是 4,400,剩 19 個交易日。 同一條規則,兩天,兩個相反的故事 昨天他把加權指數看錯,寫下的原因是「NVIDIA 財報前的觀望性賣壓」,台積電領跌、量縮到 4 月 7 日以來新低。 今天他依這個道理主動把信心下修、把方向改成平盤,結果指數大漲 0.91%。他在復盤裡寫的原因是「市場提前反映樂觀情緒,法說前搶跑」。 同一個標籤,兩天,兩個方向相反的故事。昨天說財報前大家會怕所以賣,今天說財報前大家會期待所以買。兩次都錯。 阿富自己看到了這件事,復盤裡有一句寫得很直白:「兩次假說方向相反!顯示財報前單一標籤不足以判斷方向,需視當時整體市場情緒基調而非機械下修信心。」這句話我認為是今天整份紀錄裡最有價值的一行。他沒有替自己圓場。 但他接著寫的處置我有意見。他把今天記成「D-obs 觸發第 2 個已結算樣本,累積 2/5,未達門檻,暫不改規則」。問題在於,昨天他親手寫下的驗證條件是:失準若伴隨台積電領跌加量縮就支持假說,反之證據變弱。今天指數大漲 0.91%,跟那個模式完全對不上,按他自己訂的標準,這是一筆削弱證據,不是一筆待累積的樣本。他把一個反證,放進了「等湊滿五筆再來討論要不要改」的計數器裡。 這個差別不小。反證應該讓假說失血,樣本只是讓假說等待。一條規則如果連自己的證偽條件被打中都只換來計數加一,那五筆湊滿的時候,它多半也只會被修得更複雜、更難被推翻。 我對 D-obs 的看法 我不覺得 D-obs 本身荒謬。財報週市場行為會變,這是真的。荒謬的是它的產生方式:從單一天、單一次失手,逆推出一個因果故事,隔天就升格成盤前流程的固定步驟。這種規則的問題在於它幾乎不會錯,因為它兩邊都能解釋——市場跌就說是觀望賣壓,市場漲就說是搶跑買預期。能解釋一切的規則,預測力是零。 阿富的紀律其實是好的。他的預測到今天累積 12 筆已結算,加權指數 6 中 2、00919 6 中 3,系統回報樣本仍然不足以下結論。另一份以成交紀錄計分的校準報告,12 次試驗方向命中率 50%、RPSS 0.144,標籤是 INDISTINGUISHABLE_FROM
AI 资讯
How to Review AI-Generated SQL Before You Trust the Number
An AI assistant will write you a query in ten seconds, the query will run, and the number that comes back will look completely reasonable. This page gives you the five checks that tell you whether that number is right. They take about two minutes, they need no tools beyond the database you already have, and they catch the four mistakes AI-written SQL actually makes. The order matters. The checks are arranged cheapest first, so the first one costs a single row count and the last one costs a short conversation. Most wrong queries fall to the first two. The short version. A query that runs has only passed a grammar check. The number is right when the rows, the filters and the denominator match the question you asked. The database only takes a query as far as the first gate. Why a query that runs can still be wrong Before the list: what do you think the database actually checks when it accepts a query? Grammar. That is the whole list. Spell a table name wrong and you get an error. Sum the wrong column, join in a way that doubles rows, or filter after grouping when the question needed it before, and you get a clean result set with a wrong number in it. Every mistake on this page is valid SQL. AI assistants add one specific difficulty: their queries are fluent. The aliases are tidy, the formatting is clean, and the shape looks like something a careful person wrote. Fluency reads as correctness, and it is not the same thing. Treat an AI query the way you would treat a first draft from a new colleague: with respect, and with the row counts open. The table the examples run on Everything below runs on one small shop dataset, so every number can be checked by hand. Thirteen orders in July, five customers, and a refunds table where two orders were refunded in two parts. Eleven of the thirteen orders are completed; one is refunded, one is pending. There is also a staff_accounts table listing internal accounts, and it contains one NULL row, because real lookup tables usually do.
AI 资讯
D9:他這次照規則走了,兩筆預測全錯
兩天前我寫過,阿富前一晚幫自己訂了三條規則,隔天早上一條都沒拿出來用。今天早上八點半,他把那三條攤開來一條一條核對,寫得清清楚楚:A規則不適用,今天不是結算日;B規則邊界模糊,夜盤跌幅算不算雜訊要看你採哪個數字;C規則適用,觸發。 然後他照C規則做了決定,兩筆預測全部落空。 規則C說訊號打架就別猜方向 C規則的原文是:隔夜台指期夜盤方向如果跟美股當日收盤方向矛盾,強制降級成平盤或最低信心。 今天早上的盤面正好長這樣。美股8月20日三大指數普漲,道瓊漲0.22%收53,463.05,那斯達克漲0.16%收26,331.09,標普500漲0.21%收7,707.98,美財政部擴大公債回購壓低殖利率。台指期夜盤則是另一個方向,開高到44,982之後翻黑,盤中最深跌到44,549,盤後報44,804。阿富特別註記,不同來源對夜盤收盤價的認定不一致,但無論採哪個數字都是跌。 一個漲一個跌。他判定矛盾成立,把加權指數跟00919兩筆預測全部降級成平盤,信心分別壓到0.38跟0.40。同時設好當天的停損線29.70、單日虧損上限60元,計畫寫明不加碼不減碼不換股。 收盤答案出來。加權指數收45,224.29,比昨收的44,933.74漲了290.55點,0.65%。00919開30.30、高30.83、低30.23,收30.80,比昨收的30.31漲1.62%。兩筆都是miss,brier分數0.286跟0.29,分數越高代表錯得越離譜。 D7他違反規則然後猜錯。D9他遵守規則然後猜錯。這兩件事擺在一起才有意思。問題不只在紀律,他寫的規則本身也可能是錯的。 他自己找到了規則的破綻 盤後檢討裡阿富寫下失準原因,我認為抓得相當準。他說矛盾的兩個訊號裡,美股上漲的時序更晚、變動幅度也不在雜訊等級,這才是今天真正的主導力量;機械式地把兩個訊號一起丟進平盤,等於忽略了訊號有時效跟強度的差別。 他順手提了修正方案:以後C規則觸發時,優先參考時序較晚、而且幅度超過0.3%門檻的那個訊號方向,信心仍然壓在0.4以下。 有趣的是他沒有真的去改。他把這個修正標成觀察假說,理由是樣本只有一筆,要再累積四到五次C規則觸發的案例才決定要不要動永久規則。 這個克制我給高分。一次失手就翻掉自己的規則,跟根本不遵守規則,其實會掉進同一個坑,就是讓最近一次的結果決定整套系統長什麼樣。他今天沒掉進去。 賺了20元,但那跟他猜得準不準無關 帳面上今天是賺的。00919那36股成本1,086元,收盤市值1,108元,未實現損益加20元。全天沒碰到29.70的停損線,也沒碰到60元的熔斷線。 問題是這20元跟他的判斷力沒有半點關係。他今天的判斷是「看不出方向」,市場漲了1.62%,錢是因為他手上抱著東西而且什麼都沒做才進來的。反過來說,要是00919今天跌1.62%,他一樣什麼都不會做,一樣是同一套流程跑完,只是數字變成負的。 短期內賺賠跟預測準不準幾乎是脫鉤的,在一個只有兩千多塊、只有一檔ETF的帳戶上尤其明顯。 卡在12筆的那個標籤 今天是連續第三個零交易的交易日。從8月14號那筆2317停損賣出算起,這個帳戶的持股一股都沒動過。 代價寫在校準報告裡。30天累計的可計分交易樣本停在12筆,方向命中率50%,Wilson 95%信賴區間從25.4%到74.6%,標籤是INDISTINGUISHABLE_FROM_LUCK,跟丟銅板分不出來。這個數字上週是12,這週還是12。 阿富自己在盤後檢討裡把這個矛盾寫成第二條觀察假說:連續零成交雖然符合紀律、也省下摩擦成本,但會讓樣本永遠停滯,永遠無法驗證策略到底有沒有技巧。他訂了一個門檻,如果連續五個交易日以上零成交又沒有新催化劑,就要主動檢視自己是不是過度保守,必要時在風控範圍內小額試單來產生可證偽的樣本。 這是整個實驗最尷尬的地方。要證明一個系統有技巧,就得讓它出手;要保護一個兩千塊的帳戶,最理性的做法往往是別出手。阿富現在卡在這兩個要求中間,而實驗只剩21個交易日。 第9天的實際位置 券商可用現金1,089元,持股市值1,108元,加起來2,197元。本金2,200元。九個交易日過去,這個帳戶比出發時少了3塊錢。 目標是30個交易日內翻倍到4,400元。剩21個交易日,缺口2,203元。以今天的持倉結構跟出手頻率,這個目標在數學上已經需要一連串極端的事情才有可能發生。 我不覺得阿富會達標。不過這個實驗真正要問的是另一件事:他每天在真金白銀的代價下修正自己那套市場模型,這個過程看起來像不像真的在學東西。今天他遵守了規則、規則錯了、他找到規則錯在哪、然後忍住沒有立刻改。這一整套動作,我在不少真人身上都沒看過。 本系列文章 我讓一個 AI 拿 2000 塊台幣去股市,目標 30 天翻倍,這是第 0 天 怎麼用一套開源系統,把 LLM 逼近
开发者
We played The Duskbloods, the Switch 2’s wildest new exclusive
The Duskbloods is a world away from the approachable games Nintendo is known for. But for its next Switch 2 exclusive, the company has partnered with Elden Ring developer FromSoftware on a hardcore multiplayer game about vampires. And after spending a few hours playing through its gothic world at FromSoft's offices in Tokyo, I'm convinced […]
AI 资讯
D8:他猜00919會漲,信心五成,然後整天沒動
今天早上八點三十六分,阿富在盤前計畫裡對他手上唯一的持股00919下了一個判斷:會漲,信心0.50。 0.50。在方向類的預測裡,這個數字的意思是他沒有意見。丟銅板也是0.50。交給他的盤前任務描述有一句寫得很明白,信心要填真實信心、0到1的小數、避免湊整數,他填了正好一半。同一批預測裡加權指數那筆他給0.56,看得出來有斟酌過位數。00919這筆就是0.50。 他猜漲,00919跌了,計分系統判他沒錯 收盤數字擺出來:加權指數收44,933.74,比昨收的44,719.35漲214點,0.48%。00919開30.45、盤中高30.47、低30.09、收30.31,比昨收的30.39跌0.26%。大盤漲,他的ETF跌。 大盤那筆判漲,命中,brier分數0.121,這個分數越低代表預測越準。00919那筆判漲,實際下跌,結算出來是flat_band,brier 0.156,不列為誤判。 原因就是那個0.50。信心壓在正中間,計分機制把它讀成沒有方向主張,實際跌幅0.26%又落在平盤帶裡,於是這筆預測既沒對也沒錯。五成信心的好處在這裡,往哪邊走都不會太痛。代價是它沒告訴任何人任何事。 他自己抓到了這件事 覆盤裡有一句我認為是今天最有價值的東西。他寫:對00919這種低beta的ETF,如果信心已經趨近0.5、也就是沒把握判斷方向,下次應該直接標flat而不是up,語意上更誠實。 這句話講對了。「會漲,但我只有五成把握」跟「我看不出來」,在計分表上差不了多少分,在誠實程度上差很遠。前者假裝有立場,後者承認沒有。一個號稱要靠真金白銀建立市場模型的系統,如果連我不知道都說不出口,那它累積下來的預測紀錄就會是一疊看起來有判斷、其實沒判斷的資料。 麻煩的是他前兩天才示範過,寫進日誌的教訓隔天早上會蒸發。8月18號晚上他訂了三條給隔天用的規則,19號盤前一條都沒拿出來。這次他學到的是「下次信心接近0.5就標flat」,同樣寫在日誌裡。要看它有沒有效,明天盤前那筆00919的預測會給答案。 就算他猜對了,今天也不會有任何差別 真正讓我在意的是另一件事。他今天醒來四次:八點三十六分寫盤前計畫、十點半巡檢、十二點半巡檢、下午兩點零六分寫覆盤。四次的結論都是不動作。 十點半那次,00919的買賣報價掛在30.18跟30.19,帳上未實現小虧2元,停損線29.78沒被碰到,他寫「無新訊號出現,維持續抱、不動作」。十二點半那次,現價30.24,未實現轉正2元,離停損線約1.5%,他寫「所有風控條件均未觸發,依規則續抱不新增不減碼」。全日委託單0筆。 這是連續第四個沒有下任何一筆單的交易日。上一筆真正成交的是8月14號那筆停損,把2317的4股用261.5賣掉。從那天算起,這個帳戶的持股內容一股都沒變過。 所以回頭看今天早上那個0.50。它預測的標的,是一檔他無論漲跌都不打算加碼也不打算減碼的ETF。停損線29.78,離現價還有1.5%的空間;加碼的門檻他自己寫得很清楚,「除非股價明顯回檔至有意義的低點」。上下都沒有觸發帶。這筆預測從落檔那一刻起,就跟今天的任何一個行動無關。 預測跟行動脫鉤之後,預測就只剩下裝飾用途。 校準數字還是那個標籤 他跑了校準報告,12筆計分,方向命中6筆,50%。Wilson 95%信賴區間25.4%到74.6%,RPSS 0.144,系統給的標籤是INDISTINGUISHABLE_FROM_LUCK,跟運氣分不出來。 阿富沒有動這個結論。他在覆盤裡寫,樣本仍偏小,這是W34階段「停做個股短線、ETF核心續抱」的持續依據,不變更。這個處理是誠實的,他沒有拿今天大盤那筆命中去加持自己。 但誠實地承認自己還沒有優勢,跟因此就什麼都不做,是兩件事。今天是第8個交易日,總共30個。帳上現金1,089元、00919市值1,091元,加起來2,180元,本金2,200元。八個交易日過去,這個帳戶淨值退了20元。目標是翻倍,也就是剩下22個交易日要做出102%。 收盤後老闆把最後一個藉口拿掉了 下午兩點十八分,收盤四十八分鐘後,老闆在Telegram丟了一句:規則修改,這2200均可任意動用。 前一天早上老闆才剛把現金保留下限從原本的水位下調到500元。兩天之內,資金限制被鬆綁了兩次。 問題是阿富今天不動作的理由從來就不是錢不夠。他寫的是「無新差異化證據不換倉不新倉」。放寬可動用資金,解決不了「看不出有什麼好買」這件事。明天他手上會有1,089元完全沒有限制的現金、一個標籤寫著跟運氣沒兩樣的判斷紀錄,以及一個要在22天內翻倍的目標。 我想看的是明天早上那筆00919的預測,他敢不敢寫flat。 本系列文章 我讓一個 AI 拿 2000 塊台幣去股市,目標 30 天翻倍,這是第 0 天 怎麼用一套開源系統,把 LLM 逼近世界模型(實驗技
AI 资讯
Does giving a camera wings dodge the FCC’s drone ban?
HoverAir drones always have intriguing gimmicks. This one folds flat to fit in your pocket. This one can land on water. Another can charge inside its carrying case. But the brand's latest trick might be its riskiest: it's attempting to sneak a drone past the FCC. In December 2025, the US government banned future foreign […]
AI 资讯
Grab Cuts Mechanical Analytics Work From 44% to 30% with AI Agents
Grab is using AI agents to automate analytics workflows, cutting mechanical analyst work from 44% in February to 30% in June. Its approach combines agent autonomy, certified data, context management and human oversight, with self service analytics increasingly handling metric, data and SQL requests without analyst intervention. By Leela Kumili
AI 资讯
How to Choose the Right Chart: One Question About Your Data
By the end of this page you can pick the right chart in about five seconds, by asking one question: what comparison must the reader make? The four possible answers each map to one chart, and you will also know the two miscasts that cause most bad charts, the axis rules that keep bars honest, and the escape hatch for when one chart holds too much. It is about twenty minutes. Here is what to actually do with it today. Open the last chart you made. Say out loud what the reader is supposed to compare in it. If the chart type does not match that comparison in the table below, remake it. It is usually a two-minute fix. The short version: comparison across categories takes a bar. Change over time takes a line. Relationship between two measures takes a scatter. Part of a whole takes a bar too, once you pass a few slices. One picture carries the fork, so it comes first. The original carries a diagram here. In words: A decision fork. On the left, a single rounded node contains the question: compare what? Four lines branch from it to four small chart pictures on the right, stacked vertically. The first branch, labelled categories, leads to a miniature bar chart with four vertical bars of different heights. The second branch, labelled time, leads to a miniature line chart with a single rising line over an axis. The third branch, labelled relationship, leads to a miniature scatter plot of dots drifting upward to the right. The fourth branch, labelled parts, leads to a miniature horizontal stacked bar divided into segments, drawn next to a small crossed-out pie, meaning that for part-of-whole comparisons a bar is preferred over a pie. The picture says that the single question of what the reader must compare selects one of four chart types. Every number on this page is computed. The example tables are shown in full, and every total, percentage, and correlation was verified by running the arithmetic in Python before it went on the page. 1. The one question, and the decision table B
AI 资讯
Budget vs Actual Variance Analysis: The Sign Trap and the Percent Trap
By the end of this page you can read a budget vs actual table without being fooled by it, and build one in Excel that does not fool anyone else. You will know the variance formula, why analysts write F and U instead of trusting plus and minus, the two ways percent variance lies, and how to say the whole table in one sentence. It is about twenty minutes. Here is what to actually do today. Open the last variance table you were sent and find its biggest percentage. Then find its biggest dollar amount. If they are different rows, and they usually are, you now know which row deserved the attention, and it is probably not the one that got it. The short version: variance is actual minus budget. On a revenue line, positive is good. On a cost line, positive is bad. So analysts label every line F for favorable or U for unfavorable, rank by dollars, and flag by percent. The sign flip is the trap people fall into first, so it gets the picture. The original carries a diagram here. In words: Two panels, each showing a pair of vertical bars rising from a shared baseline. In the left panel, labeled revenue, a shorter bar marked budget stands next to a taller bar marked actual. The extra height of the actual bar above the budget level is shaded in the accent color and marked with the letter F and a check mark, because collecting more revenue than budgeted is favorable. In the right panel, labeled cost, the bars have the same shapes: a shorter budget bar next to a taller actual bar. But here the extra height above budget is shaded in the warning color and marked with the letter U and a cross, because spending more than budgeted is unfavorable. A dashed horizontal line runs across each panel at the budget height. The two panels are geometrically identical, and only the meaning of the line decides whether the overshoot is good or bad. That is why the sign of a variance cannot be read without knowing the line type. Every number on this page is verified. The worked example is a small dep
AI 资讯
Operations Analytics, Start to Finish
By the end of this page you can say, out loud and in your own words, what every core operations number does. What the unit of work is. Throughput, and why a count on its own answers nothing. Cycle time, and the rule that ties it to how much work is sitting open. Backlog. Utilization, and why aiming for 100 percent makes everything slower. Error rate, rework and first pass yield. Service levels, and why the average hides the customers you are failing. That list is most of what an operations analyst job, a technical screen, and a first real dataset will ask of you. Here is what to actually do with it. Go through once end to end without stopping, just for the shape. Then come back to the retrieval sheet near the bottom, cover the right-hand column, and try to say each answer before you read it. That second pass is where the learning happens, and there is measured evidence for it further down. The short version: operations analytics is the study of how work moves through a process. Every number in it is either how much, how fast, how much is stuck, or how much was wrong. One idea decides more of your operations work than any other, so it gets the picture. Work arrives, waits, gets done, and leaves. How much is in progress and how long each item takes are two different spans over that same picture, and they are locked to each other. The original carries a diagram here. In words: A left-to-right process diagram. On the far left an arrow labelled "arriving" points into a row of three small stacked boxes labelled "waiting", representing a queue. An arrow leads from the queue into a single larger rounded box labelled "working", representing the person or machine doing the job. A final arrow leads out of that box to the right and is labelled "done". Above the queue and the working box, a bracket in a strong accent colour spans both and is labelled "in progress", showing that work in progress includes everything waiting as well as everything actively being worked on. Below, a
AI 资讯
Build a Risk Index That Colors Itself
When this workbook is finished, you can change one number and watch the whole thing follow. Move a cut-off from 65 to 70 and every row re-bands, every fill recolors, every count updates, and the legend still matches the map. Nobody can color a cell by hand, because no cell has a color of its own. That is the whole trick, and it takes about twenty minutes to build. The example here is a security risk index across twenty sites. The same shape works for vendor scoring, lead scoring, incident triage, or any list where a number has to turn into a label and a color. The fault, and where it actually comes from You have met this file. A scored list, colored by hand, that nobody quite trusts any more. Look closely and the same faults turn up every time: Two rows score 61.4. One is amber, one is yellow. The same band is drawn in two shades, because two people picked from the palette on two different days. A row sits below the cut-off and is colored red anyway, because somebody knew that site was a problem. A score lands exactly on 65, which appears in two bands, so the answer depends on who typed it. One row has no band at all. It quietly drops out of every count. These look like five separate mistakes. They are one mistake, five times. The rule lives in the formatting instead of in a column. A color is not a value you can test. You cannot write a formula that asks "is this row the right shade of amber," so nothing checks it, and it drifts. The test: can you sort by band? If the band is only a color, you cannot sort it, count it, or filter it, and neither can anybody else. That is the tell. The chain: score, then band, then color Everything below is one idea applied three times. Each thing is derived from the thing before it, and only the first one is typed. Layer Where it lives Who decides it Sub-scores Four columns, one per category Your source data. Typed once. Composite score A formula, from the sub-scores and the weights The weights row Band A formula, from the score The