DataTable dt = new DataTable(); IEnumerable<IGrouping<string, DataRow>> result = dt.Rows.Cast<DataRow>().GroupBy<DataRow, string>(dr => dr["行政代码"].ToString().Substring(0, 2));//按行政区代码前两位分组